Skip to content

Commit e8e69ae

Browse files
committed
update UI
1 parent db396a7 commit e8e69ae

File tree

10 files changed

+368
-128
lines changed

10 files changed

+368
-128
lines changed

apps/dashboard/src/@/components/blocks/wallet-address.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function WalletAddress(props: {
2424
iconClassName?: string;
2525
client: ThirdwebClient;
2626
preventOpenOnFocus?: boolean;
27+
fallbackIcon?: React.ReactNode;
2728
}) {
2829
// default back to zero address if no address provided
2930
const address = useMemo(() => props.address || ZERO_ADDRESS, [props.address]);
@@ -86,6 +87,7 @@ export function WalletAddress(props: {
8687
iconClassName={props.iconClassName}
8788
profiles={profiles.data || []}
8889
thirdwebClient={props.client}
90+
fallbackIcon={props.fallbackIcon}
8991
/>
9092
)}
9193
<span className="cursor-pointer font-mono">
@@ -177,6 +179,7 @@ function WalletAvatar(props: {
177179
profiles: SocialProfile[];
178180
thirdwebClient: ThirdwebClient;
179181
iconClassName?: string;
182+
fallbackIcon?: React.ReactNode;
180183
}) {
181184
const avatar = useMemo(() => {
182185
return props.profiles.find(
@@ -203,6 +206,8 @@ function WalletAvatar(props: {
203206
className={cn("size-6 object-cover", props.iconClassName)}
204207
src={resolvedAvatarSrc}
205208
/>
209+
) : props.fallbackIcon ? (
210+
props.fallbackIcon
206211
) : (
207212
<Blobbie
208213
address={props.address}

apps/dashboard/src/@/components/ui/CopyAddressButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export function CopyAddressButton(props: {
2525
copyIconPosition={props.copyIconPosition}
2626
textToCopy={props.address}
2727
textToShow={shortenedAddress}
28+
iconClassName={props.iconClassName}
2829
tooltip={props.tooltip || "Copy Address"}
2930
variant={props.variant}
3031
/>

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageMetadataSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ThirdwebContract } from "thirdweb";
22
import { getDeployedEntrypointERC20 } from "thirdweb/assets";
33
import { contractType as getContractType } from "thirdweb/extensions/thirdweb";
44
import { resolveFunctionSelectors } from "@/lib/selectors";
5-
import { getValidReward } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/claim-rewards/utils/rewards";
5+
import { getValidReward } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/rewards/utils/rewards";
66
import {
77
isERC20ClaimConditionsSupported,
88
isERC721ClaimConditionsSupported,

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractPageSidebarLinks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ export function getContractPageSidebarLinks(data: {
143143
{
144144
exactMatch: true,
145145
hide: !data.metadata.showClaimRewards,
146-
href: `${layoutPrefix}/claim-rewards`,
147-
label: "Claim Rewards",
146+
href: `${layoutPrefix}/rewards`,
147+
label: "Rewards",
148148
},
149149
];
150150

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

Lines changed: 0 additions & 118 deletions
This file was deleted.
Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Meta } from "@storybook/nextjs";
22
import { toUnits } from "thirdweb";
3+
import { base } from "thirdweb/chains";
34
import { ThirdwebProvider } from "thirdweb/react";
45
import { storybookThirdwebClient } from "@/storybook/utils";
56
import { ClaimRewardsPageUI } from "./claim-rewards-page";
@@ -10,7 +11,7 @@ const meta = {
1011
decorators: [
1112
(Story) => (
1213
<ThirdwebProvider>
13-
<div className="container max-w-7xl py-10">
14+
<div className="container max-w-[1154px] py-10">
1415
<Story />
1516
</div>
1617
</ThirdwebProvider>
@@ -28,10 +29,12 @@ function unclaimedFeesStub(token0Amount: bigint, token1Amount: bigint) {
2829
token0: {
2930
address: "0x1234567890123456789012345678901234567890",
3031
amount: token0Amount,
32+
symbol: "FOO",
3133
},
3234
token1: {
3335
address: "0x0987654321098765432109876543210987654321",
3436
amount: token1Amount,
37+
symbol: "BAR",
3538
},
3639
};
3740
}
@@ -41,6 +44,7 @@ export function LargeAmounts() {
4144
<Variant
4245
token0Amount={toUnits("100000", 18)}
4346
token1Amount={toUnits("500000", 18)}
47+
includeChainExplorer
4448
/>
4549
);
4650
}
@@ -50,24 +54,42 @@ export function SmallAmounts() {
5054
<Variant
5155
token0Amount={toUnits("0.001", 18)}
5256
token1Amount={toUnits("0.0005", 18)}
57+
includeChainExplorer
5358
/>
5459
);
5560
}
5661

57-
export function ZeroAmounts() {
62+
export function ZeroAmount() {
63+
return (
64+
<Variant
65+
token0Amount={toUnits("0", 18)}
66+
token1Amount={toUnits("0", 18)}
67+
includeChainExplorer
68+
/>
69+
);
70+
}
71+
72+
export function ZeroAmountNoChainExplorer() {
5873
return (
5974
<Variant token0Amount={toUnits("0", 18)} token1Amount={toUnits("0", 18)} />
6075
);
6176
}
6277

63-
function Variant(props: { token0Amount: bigint; token1Amount: bigint }) {
78+
function Variant(props: {
79+
token0Amount: bigint;
80+
token1Amount: bigint;
81+
includeChainExplorer?: boolean;
82+
}) {
6483
return (
6584
<ClaimRewardsPageUI
85+
referrerBps={5000}
86+
chainSlug="base"
6687
recipient={recipient}
6788
referrer={referrer}
6889
client={storybookThirdwebClient}
6990
handleClaim={() => {}}
7091
isClaimPending={false}
92+
chain={base}
7193
unclaimedFees={unclaimedFeesStub(props.token0Amount, props.token1Amount)}
7294
/>
7395
);

0 commit comments

Comments
 (0)