Skip to content

Commit b6c52e6

Browse files
authored
feat: display node tags (#6)
* feat: display node tags * style: compact node tags * fix: keep node list columns aligned * feat: add util for processing tags * fix: remove tags from homepage * fix: add default value if no tags are present * chore: increment version
1 parent edfc87d commit b6c52e6

File tree

8 files changed

+245
-218
lines changed

8 files changed

+245
-218
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ yarn-error.log*
4040
# typescript
4141
*.tsbuildinfo
4242
next-env.d.ts
43+
44+
.idea

app/server-components/Nodes/NodeListGNDCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default async function NodeListGNDCard() {
4040
last_epoch_avail: nodeResponse.epochs_vals[0],
4141
},
4242
ver: nodeResponse.node_version,
43+
tags: nodeResponse.tags,
4344
};
4445
} catch (error: any) {
4546
console.log(error);

app/server-components/Nodes/NodeListNodeCard.tsx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,25 @@ export default async function NodeListNodeCard({
3333
}: Props) {
3434
return (
3535
<BorderedCard useCustomWrapper useFixedWidthLarge>
36-
<div className="row justify-between gap-3 py-2 md:py-3 lg:gap-6">
37-
<Link href={`${routePath.node}/${node.eth_addr}`} className="group min-w-[130px] py-3">
38-
<div className="row gap-1.5">
39-
<div className="overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium group-hover:text-primary lg:text-[15px]">
40-
{node.alias}
36+
<div className="row items-start justify-between gap-3 py-2 md:py-3 lg:gap-6">
37+
<Link
38+
href={`${routePath.node}/${node.eth_addr}`}
39+
className="group w-[130px] shrink-0 py-3"
40+
>
41+
<div className="col gap-1">
42+
<div className="row gap-1.5">
43+
<div className="overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium group-hover:text-primary lg:text-[15px]">
44+
{node.alias}
45+
</div>
46+
47+
{false && <RiEye2Line className="text-lg text-primary" />}
4148
</div>
4249

43-
{false && <RiEye2Line className="text-lg text-primary" />}
4450
</div>
4551
</Link>
4652

4753
{/* Node Addresses */}
48-
<div className="flex min-w-[164px]">
54+
<div className="flex min-w-[164px] shrink-0">
4955
<SmallCard>
5056
<div className="row gap-2.5">
5157
<div className="h-9 w-1 rounded-full bg-primary-500"></div>
@@ -64,14 +70,16 @@ export default async function NodeListNodeCard({
6470
</div>
6571

6672
{/* License */}
67-
<LicenseSmallCard
68-
licenseId={Number(licenseId)}
69-
licenseType={licenseType}
70-
totalAssignedAmount={totalAssignedAmount}
71-
totalClaimedAmount={totalClaimedAmount}
72-
isBanned={isBanned}
73-
isLink
74-
/>
73+
<div className="flex min-w-[244px] shrink-0">
74+
<LicenseSmallCard
75+
licenseId={Number(licenseId)}
76+
licenseType={licenseType}
77+
totalAssignedAmount={totalAssignedAmount}
78+
totalClaimedAmount={totalClaimedAmount}
79+
isBanned={isBanned}
80+
isLink
81+
/>
82+
</div>
7583

7684
{/* Owner */}
7785
{!isEmptyETHAddr(owner) && (

0 commit comments

Comments
 (0)