Skip to content

Commit f07f9b4

Browse files
committed
distribute page ui updates
1 parent 23a9a62 commit f07f9b4

File tree

1 file changed

+31
-14
lines changed
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/rewards/components

1 file changed

+31
-14
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/rewards/components/claim-rewards-page.tsx

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { ArrowRightIcon, ExternalLinkIcon } from "lucide-react";
3+
import { DollarSignIcon, ExternalLinkIcon, SplitIcon } from "lucide-react";
44
import Link from "next/link";
55
import { toast } from "sonner";
66
import {
@@ -118,7 +118,7 @@ export function ClaimRewardsPageUI(props: {
118118

119119
const recipientColor = `hsl(var(--chart-1))`;
120120
const referrerColor = `hsl(var(--chart-2))`;
121-
const protocolFeesColor = `hsl(var(--chart-10))`;
121+
const protocolFeesColor = `hsl(var(--chart-3))`;
122122

123123
const hasUnclaimedRewards =
124124
props.unclaimedFees.token0.amount > 0 ||
@@ -127,8 +127,8 @@ export function ClaimRewardsPageUI(props: {
127127
return (
128128
<div>
129129
<div className="bg-card rounded-lg border">
130-
<div className="p-4 lg:px-6 py-5 border-b">
131-
<h2 className="font-semibold text-2xl tracking-tight mb-0.5 lg:mb-0">
130+
<div className="p-4 lg:px-8 py-8 border-b border-dashed">
131+
<h2 className="font-semibold text-2xl tracking-tight mb-1">
132132
Rewards
133133
</h2>
134134
<p className="text-muted-foreground text-sm">
@@ -138,9 +138,17 @@ export function ClaimRewardsPageUI(props: {
138138
</p>
139139
</div>
140140

141-
<div className="p-4 lg:p-6 border-b border-dashed">
142-
<div className="mb-2">
143-
<h3 className="font-medium text-base">Unclaimed Rewards</h3>
141+
<div className="p-4 lg:px-8 py-8 border-b border-dashed">
142+
<div className="mb-3">
143+
<div className="flex mb-3">
144+
<div className="rounded-full border p-2">
145+
<DollarSignIcon className="size-4 text-muted-foreground" />
146+
</div>
147+
</div>
148+
<h3 className="font-medium text-lg">Unclaimed Rewards</h3>
149+
<p className="text-muted-foreground text-sm">
150+
The rewards that are earned but haven't been distributed yet
151+
</p>
144152
</div>
145153
<div className="flex flex-col gap-3 lg:flex-row">
146154
<TokenReward
@@ -158,10 +166,19 @@ export function ClaimRewardsPageUI(props: {
158166
</div>
159167
</div>
160168

161-
<div className="p-4 lg:p-6">
169+
<div className="p-4 lg:px-8 py-8">
170+
<div className="flex mb-3">
171+
<div className="rounded-full border p-2">
172+
<SplitIcon className="size-4 text-muted-foreground" />
173+
</div>
174+
</div>
175+
176+
<h3 className="font-medium text-lg">Reward Distribution</h3>
177+
<p className="text-muted-foreground text-sm mb-3">
178+
The unclaimed rewards will be distributed as:
179+
</p>
180+
162181
<DistributionBarChart
163-
title="Reward Distribution"
164-
titleClassName="text-base"
165182
segments={[
166183
{
167184
label: "Recipient",
@@ -225,7 +242,7 @@ export function ClaimRewardsPageUI(props: {
225242
</div>
226243
</div>
227244

228-
<div className="p-4 py-4 lg:px-6 border-t flex justify-between items-center">
245+
<div className="p-4 py-6 lg:px-8 border-t border-dashed flex-col lg:flex-row flex lg:justify-between lg:items-center gap-4">
229246
{hasUnclaimedRewards && (
230247
<p className="text-muted-foreground text-sm">
231248
Click on "Distribute Rewards" to distribute unclaimed rewards
@@ -239,14 +256,14 @@ export function ClaimRewardsPageUI(props: {
239256
)}
240257
<Button
241258
onClick={props.handleClaim}
242-
className="gap-2"
259+
className="gap-2 rounded-lg"
243260
disabled={!hasUnclaimedRewards}
244261
>
245262
Distribute Rewards
246263
{props.isClaimPending ? (
247264
<Spinner className="size-4" />
248265
) : (
249-
<ArrowRightIcon className="size-4" />
266+
<SplitIcon className="size-4" />
250267
)}
251268
</Button>
252269
</div>
@@ -272,7 +289,7 @@ function TokenReward(props: {
272289
);
273290

274291
return (
275-
<div className="border p-3 rounded-xl flex items-center gap-3 min-w-[300px] bg-background relative hover:border-active-border">
292+
<div className="border p-3 rounded-lg flex items-center gap-3 min-w-[300px] bg-background relative hover:border-active-border">
276293
<div className="rounded-full border shrink-0">
277294
<TokenProvider
278295
address={props.token.address}

0 commit comments

Comments
 (0)