Skip to content

Commit 6b67978

Browse files
MananTankjnsdls
authored andcommitted
Dashboard Project sidebar changes
1 parent 9667c74 commit 6b67978

File tree

43 files changed

+305
-1035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+305
-1035
lines changed

apps/dashboard/src/@/components/blocks/Sidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type SidebarBaseLink = {
99
label: React.ReactNode;
1010
exactMatch?: boolean;
1111
icon?: React.FC<{ className?: string }>;
12+
isActive?: (pathname: string) => boolean;
1213
};
1314

1415
export type SidebarLink =

apps/dashboard/src/@/components/blocks/SidebarLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function RenderSidebarGroup(props: {
123123
className="flex items-center gap-2 text-muted-foreground text-sm hover:bg-accent"
124124
exactMatch={link.exactMatch}
125125
href={link.href}
126+
isActive={link.isActive}
126127
onClick={() => {
127128
sidebar.setOpenMobile(false);
128129
}}

apps/dashboard/src/@/components/blocks/UpsellBannerCard.stories.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ function Story() {
1717
description="Upgrade to increase limits and access advanced features."
1818
icon={<RocketIcon className="size-5" />}
1919
title="Unlock more with thirdweb"
20-
trackingCategory="storybook"
21-
trackingLabel="green"
2220
/>
2321
</BadgeContainer>
2422

@@ -33,8 +31,6 @@ function Story() {
3331
description="Add additional space to your account."
3432
icon={<StarIcon className="size-5" />}
3533
title="Need more storage?"
36-
trackingCategory="storybook"
37-
trackingLabel="blue"
3834
/>
3935
</BadgeContainer>
4036

@@ -48,8 +44,6 @@ function Story() {
4844
}}
4945
description="Get early access to experimental features."
5046
title="Join the beta"
51-
trackingCategory="storybook"
52-
trackingLabel="purple"
5347
/>
5448
</BadgeContainer>
5549
</div>

apps/dashboard/src/@/components/blocks/UpsellBannerCard.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ type UpsellBannerCardProps = {
4444
target?: "_blank";
4545
link: string;
4646
};
47-
trackingCategory: string;
48-
trackingLabel: string;
4947
accentColor?: keyof typeof ACCENT;
5048
icon?: React.ReactNode;
5149
};

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ export type NavButtonProps = {
1010
href: string;
1111
exactMatch?: boolean;
1212
onClick?: () => void;
13+
isActive?: (pathname: string) => boolean;
1314
};
1415

1516
export function NavLink(props: React.PropsWithChildren<NavButtonProps>) {
1617
const pathname = usePathname();
17-
const isActive = pathname
18-
? props.exactMatch
19-
? pathname === props.href
20-
: pathname.startsWith(props.href)
21-
: false;
18+
const isActive = props.isActive
19+
? props.isActive(pathname)
20+
: pathname
21+
? props.exactMatch
22+
? pathname === props.href
23+
: pathname.startsWith(props.href)
24+
: false;
2225
return (
2326
<Link
2427
className={cn(props.className, isActive && props.activeClassName)}

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/ContractOverviewPage.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@ export const ContractOverviewPage: React.FC<ContractOverviewPageProps> = ({
5050
icon: <ExternalLinkIcon className="size-4" />,
5151
link: `/${chainSlug}/${contract.address}`,
5252
target: "_blank",
53-
text: "View asset page",
53+
text: "View token page",
5454
}}
55-
description="A public page is available for this contract for anyone to buy this asset"
56-
title="Public asset page available"
57-
trackingCategory="erc20-contract"
58-
trackingLabel="view-asset-page"
55+
description="A public page is available for this contract for anyone to buy this token"
56+
title="Public token page available"
5957
/>
6058
)}
6159

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/FreePlanUpsellBannerUI.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export function FreePlanUpsellBannerUI(props: {
2626
description="Upgrade to increase limits and access advanced features."
2727
icon={<RocketIcon className="size-5" />}
2828
title="Unlock more with thirdweb"
29-
trackingCategory="billingBanner"
30-
trackingLabel="freePlan_viewPlans"
3129
/>
3230
);
3331
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/cards.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ export function Cards(props: {
6262
/>
6363

6464
<CardLink
65-
description="Import tokens or NFTs you own to the project"
65+
description="Import coins or NFTs you own to the project"
6666
href={undefined}
6767
icon={ArrowDownToLineIcon}
6868
onClick={() => {
6969
reportAssetImportStarted();
7070
setImportModalOpen(true);
7171
}}
72-
title="Import Existing Asset"
72+
title="Import Existing Token"
7373
/>
7474
</div>
7575
);

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export default async function Page(props: {
5353
/>
5454

5555
<div className="mt-10 mb-3">
56-
<h2 className="font-semibold text-2xl tracking-tight">Your assets</h2>
56+
<h2 className="font-semibold text-2xl tracking-tight">Your Tokens</h2>
5757
<p className="text-muted-foreground">
58-
List of all assets created or imported into this project
58+
List of all tokens created or imported into this project
5959
</p>
6060
</div>
6161

@@ -79,7 +79,7 @@ function AssetsHeader() {
7979
<div className="border-b">
8080
<div className="container max-w-7xl py-10">
8181
<h1 className="font-semibold text-2xl tracking-tight lg:text-3xl">
82-
Assets
82+
Tokens
8383
</h1>
8484
<p className="text-muted-foreground">
8585
Create and Manage tokens for your project

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon";
55
import { UnityIcon } from "components/icons/brand-icons/UnityIcon";
66
import { UnrealIcon } from "components/icons/brand-icons/UnrealIcon";
77
import {
8+
ArrowLeftRightIcon,
89
ChevronRightIcon,
910
CircleAlertIcon,
1011
ExternalLinkIcon,
@@ -15,9 +16,8 @@ import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
1516
import { CodeServer } from "@/components/ui/code/code.server";
1617
import { UnderlineLink } from "@/components/ui/UnderlineLink";
1718
import { ContractIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon";
18-
import { EngineIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
1919
import { InsightIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon";
20-
import { NebulaIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/NebulaIcon";
20+
import { PayIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/PayIcon";
2121
import { ClientIDSection } from "./ClientIDSection";
2222
import { IntegrateAPIKeyCodeTabs } from "./IntegrateAPIKeyCodeTabs";
2323
import { SecretKeySection } from "./SecretKeySection";
@@ -230,39 +230,34 @@ function ProductsSection(props: { teamSlug: string; projectSlug: string }) {
230230
description: string;
231231
href: string;
232232
icon: React.FC<{ className?: string }>;
233-
trackingLabel: string;
234233
}> = [
235234
{
236235
description:
237236
"Scale your application with a backend server to read, write, and deploy contracts at production-grade.",
238-
href: `/team/${props.teamSlug}/${props.projectSlug}/engine`,
239-
icon: EngineIcon,
240-
title: "Engine",
241-
trackingLabel: "engine",
237+
href: `/team/${props.teamSlug}/${props.projectSlug}/transactions`,
238+
icon: ArrowLeftRightIcon,
239+
title: "Transactions",
242240
},
243241
{
244242
description:
245243
"Deploy your own contracts or leverage existing solutions for onchain implementation",
246244
href: `/team/${props.teamSlug}/${props.projectSlug}/contracts`,
247245
icon: ContractIcon,
248246
title: "Contracts",
249-
trackingLabel: "contracts",
250247
},
251248
{
252249
description:
253250
"Add indexing capabilities to retrieve real-time onchain data",
254251
href: `/team/${props.teamSlug}/${props.projectSlug}/insight`,
255252
icon: InsightIcon,
256253
title: "Insight",
257-
trackingLabel: "insight",
258254
},
259255
{
260256
description:
261-
"Integrate a blockchain AI model to improve your users insight into your application and the blockchain",
262-
href: `/team/${props.teamSlug}/${props.projectSlug}/nebula`,
263-
icon: NebulaIcon,
264-
title: "Nebula",
265-
trackingLabel: "nebula",
257+
"Bridge, swap, and purchase cryptocurrencies with any fiat options or tokens via cross-chain routing",
258+
href: `/team/${props.teamSlug}/${props.projectSlug}/universal-bridge`,
259+
icon: PayIcon,
260+
title: "Universal Bridge",
266261
},
267262
];
268263

@@ -287,7 +282,6 @@ function ProductsSection(props: { teamSlug: string; projectSlug: string }) {
287282
icon={product.icon}
288283
key={product.title}
289284
title={product.title}
290-
trackingLabel={product.trackingLabel}
291285
/>
292286
))}
293287
</section>
@@ -300,7 +294,6 @@ function ProductCard(props: {
300294
description: string;
301295
href: string;
302296
icon: React.FC<{ className?: string }>;
303-
trackingLabel: string;
304297
}) {
305298
return (
306299
<div className="relative flex flex-col rounded-lg border bg-card p-4 hover:border-active-border">

0 commit comments

Comments
 (0)