Skip to content
Merged

Stage #325

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/[network]/cluster/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from "next"
import Image from "next/image"

Check warning on line 2 in src/app/[network]/cluster/[id]/page.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'Image' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 2 in src/app/[network]/cluster/[id]/page.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'Image' is defined but never used. Allowed unused vars must match /^_/u
import Link from "next/link"
import { getCluster } from "@/api/clusters"
import { searchValidators } from "@/api/validators"
Expand All @@ -8,7 +8,7 @@
import { type ChainName } from "@/config/chains"
import { validatorsSearchParamsCache } from "@/lib/search-parsers/validators-search-parsers"
import { cn } from "@/lib/utils"
import { formatSSV, numberFormatter } from "@/lib/utils/number"

Check warning on line 11 in src/app/[network]/cluster/[id]/page.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'formatSSV' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 11 in src/app/[network]/cluster/[id]/page.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'formatSSV' is defined but never used. Allowed unused vars must match /^_/u
import { remove0x, shortenAddress } from "@/lib/utils/strings"
import { Button } from "@/components/ui/button"
import { Card } from "@/components/ui/card"
Expand Down Expand Up @@ -116,7 +116,7 @@
</Text>
}
/>
<Stat
{/* <Stat
title="Current Balance"
content={
<div className="flex items-center gap-0.5">
Expand All @@ -140,7 +140,7 @@
</Text>
</div>
}
/>
/> */}
<Stat
title="Effective Balance"
tooltip="ETH staked across all validators in this cluster"
Expand Down
54 changes: 27 additions & 27 deletions src/app/_components/clusters/clusters-table-columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { formatDistanceToNowStrict } from "date-fns"

import { type Cluster } from "@/types/api"
import { formatSSV, numberFormatter } from "@/lib/utils/number"

Check warning on line 9 in src/app/_components/clusters/clusters-table-columns.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'formatSSV' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 9 in src/app/_components/clusters/clusters-table-columns.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'formatSSV' is defined but never used. Allowed unused vars must match /^_/u
import { remove0x, shortenAddress } from "@/lib/utils/strings"
import { useNetworkParam } from "@/hooks/app/useNetworkParam"
import { CopyBtn } from "@/components/ui/copy-btn"
Expand Down Expand Up @@ -92,33 +92,33 @@
),
enableSorting: false,
},
{
accessorKey: "balance",
header: ({ column }) => (
<DataTableColumnHeader column={column} title="Balance" />
),
cell: ({ row }) => {
const { ethBalance, balance, migrated } = row.original
// {
// accessorKey: "balance",
// header: ({ column }) => (
// <DataTableColumnHeader column={column} title="Balance" />
// ),
// cell: ({ row }) => {
// const { ethBalance, balance, migrated } = row.original

return (
<div className="flex items-center gap-2">
<Image
src={
migrated
? "/images/networks/dark.svg"
: "/images/ssvIcons/icon.svg"
}
alt={migrated ? "ETH" : "SSV"}
width={16}
height={16}
className="object-fit size-4"
/>
<Text>{formatSSV(BigInt(migrated ? ethBalance : balance))}</Text>
</div>
)
},
enableSorting: false,
},
// return (
// <div className="flex items-center gap-2">
// <Image
// src={
// migrated
// ? "/images/networks/dark.svg"
// : "/images/ssvIcons/icon.svg"
// }
// alt={migrated ? "ETH" : "SSV"}
// width={16}
// height={16}
// className="object-fit size-4"
// />
// <Text>{formatSSV(BigInt(migrated ? ethBalance : balance))}</Text>
// </div>
// )
// },
// enableSorting: false,
// },
{
accessorKey: "effectiveBalance",
header: ({ column }) => (
Expand Down Expand Up @@ -186,7 +186,7 @@
"ownerAddress",
"operators",
"validatorCount",
"balance",
// "balance",
"effectiveBalance",
"active",
]
Expand Down
Loading