Skip to content

Commit 4bf256f

Browse files
style
1 parent 3261dec commit 4bf256f

File tree

1 file changed

+28
-12
lines changed
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client

1 file changed

+28
-12
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/live-stats.tsx

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useQuery } from "@tanstack/react-query";
44
import { CircleCheckIcon, XIcon } from "lucide-react";
5-
import { Badge } from "@/components/ui/badge";
65
import { CopyTextButton } from "@/components/ui/CopyTextButton";
76
import { Skeleton } from "@/components/ui/skeleton";
87
import { ToolTipLabel } from "@/components/ui/tooltip";
@@ -182,17 +181,34 @@ export function ChainLiveStats(props: { rpc: string }) {
182181
</PrimaryInfoItem>
183182

184183
{/* EIP-7702 */}
185-
<PrimaryInfoItem title="EIP-7702">
186-
{eip7702Support.isError ? (
187-
<Badge variant="destructive">Disabled</Badge>
188-
) : eip7702Support.data ? (
189-
<Badge
190-
variant={
191-
eip7702Support.data.isSupported ? "success" : "destructive"
192-
}
193-
>
194-
{eip7702Support.data.isSupported ? "Enabled" : "Disabled"}
195-
</Badge>
184+
<PrimaryInfoItem
185+
title="EIP-7702"
186+
titleIcon={
187+
eip7702Support.data ? (
188+
eip7702Support.data.isSupported ? (
189+
<ToolTipLabel label="Enabled">
190+
<CircleCheckIcon className="size-4 text-success-text" />
191+
</ToolTipLabel>
192+
) : (
193+
<ToolTipLabel label="Disabled">
194+
<XIcon className="size-4 text-destructive-text" />
195+
</ToolTipLabel>
196+
)
197+
) : eip7702Support.isError ? (
198+
<ToolTipLabel label="Disabled">
199+
<XIcon className="size-4 text-destructive-text" />
200+
</ToolTipLabel>
201+
) : null
202+
}
203+
>
204+
{eip7702Support.data ? (
205+
eip7702Support.data.isSupported ? (
206+
"Enabled"
207+
) : (
208+
"Disabled"
209+
)
210+
) : eip7702Support.isError ? (
211+
"Disabled"
196212
) : (
197213
<div className="flex h-[28px] w-[80px] py-1">
198214
<Skeleton className="h-full w-full" />

0 commit comments

Comments
 (0)