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">

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

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
"use client";
22
import {
3+
ArrowLeftRightIcon,
34
BellIcon,
45
BookTextIcon,
56
BoxIcon,
67
CoinsIcon,
78
HomeIcon,
9+
LockIcon,
810
SettingsIcon,
911
WalletIcon,
1012
} from "lucide-react";
1113
import { FullWidthSidebarLayout } from "@/components/blocks/SidebarLayout";
1214
import { Badge } from "@/components/ui/badge";
1315
import { ContractIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon";
14-
import { EngineIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
1516
import { InsightIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon";
16-
import { NebulaIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/NebulaIcon";
1717
import { PayIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/PayIcon";
1818
import { SmartAccountIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/SmartAccountIcon";
1919

2020
export function ProjectSidebarLayout(props: {
2121
layoutPath: string;
22+
engineLinkType: "cloud" | "dedicated";
2223
children: React.ReactNode;
2324
}) {
24-
const { layoutPath, children } = props;
25+
const { layoutPath, engineLinkType, children } = props;
2526

2627
return (
2728
<FullWidthSidebarLayout
@@ -33,17 +34,17 @@ export function ProjectSidebarLayout(props: {
3334
label: "Overview",
3435
},
3536
{
36-
href: `${layoutPath}/connect/in-app-wallets`,
37+
href: `${layoutPath}/wallets`,
3738
icon: WalletIcon,
38-
label: "In-App Wallets",
39+
label: "Wallets",
3940
},
4041
{
41-
href: `${layoutPath}/connect/account-abstraction`,
42+
href: `${layoutPath}/account-abstraction`,
4243
icon: SmartAccountIcon,
4344
label: "Account Abstraction",
4445
},
4546
{
46-
href: `${layoutPath}/connect/universal-bridge`,
47+
href: `${layoutPath}/universal-bridge`,
4748
icon: PayIcon,
4849
label: "Universal Bridge",
4950
},
@@ -53,29 +54,40 @@ export function ProjectSidebarLayout(props: {
5354
label: "Contracts",
5455
},
5556
{
56-
href: `${layoutPath}/assets`,
57+
href: `${layoutPath}/tokens`,
5758
icon: CoinsIcon,
5859
label: (
5960
<span className="flex items-center gap-2">
60-
Assets <Badge>New</Badge>
61+
Tokens <Badge>New</Badge>
6162
</span>
6263
),
6364
},
6465
{
65-
href: `${layoutPath}/engine`,
66-
icon: EngineIcon,
67-
label: "Engine",
66+
href:
67+
engineLinkType === "cloud"
68+
? `${layoutPath}/transactions`
69+
: `${layoutPath}/engine/dedicated`,
70+
icon: ArrowLeftRightIcon,
71+
isActive: (pathname) => {
72+
return (
73+
pathname.startsWith(`${layoutPath}/transactions`) ||
74+
pathname.startsWith(`${layoutPath}/engine/dedicated`)
75+
);
76+
},
77+
label: "Transactions",
6878
},
6979
{
7080
href: `${layoutPath}/insight`,
7181
icon: InsightIcon,
7282
label: "Insight",
7383
},
7484
{
75-
href: `${layoutPath}/nebula`,
76-
icon: NebulaIcon,
77-
label: "Nebula",
85+
href: `${layoutPath}/vault`,
86+
icon: LockIcon,
87+
label: "Vault",
7888
},
89+
]}
90+
footerSidebarLinks={[
7991
{
8092
href: `${layoutPath}/webhooks`,
8193
icon: BellIcon,
@@ -85,8 +97,6 @@ export function ProjectSidebarLayout(props: {
8597
</span>
8698
),
8799
},
88-
]}
89-
footerSidebarLinks={[
90100
{
91101
href: `${layoutPath}/settings`,
92102
icon: SettingsIcon,

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/_components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export async function InAppWalletsHeader() {
44
return (
55
<div className="">
66
<h1 className="mb-2 font-semibold text-2xl tracking-tighter lg:text-3xl">
7-
In-App Wallets
7+
Wallets
88
</h1>
99
<p className="max-w-2xl text-muted-foreground text-sm leading-relaxed">
1010
A wallet infrastructure that enables apps to create, manage, and control

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/_constants.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/users/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { getProject } from "@/api/projects";
44
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
55
import { getAuthToken } from "../../../../../../../api/lib/getAuthToken";
66
import { loginRedirect } from "../../../../../../../login/loginRedirect";
7-
import { TRACKING_CATEGORY } from "../_constants";
87

98
export default async function Page(props: {
109
params: Promise<{ team_slug: string; project_slug: string }>;
@@ -35,7 +34,6 @@ export default async function Page(props: {
3534
authToken={authToken}
3635
client={client}
3736
projectClientId={project.publishableKey}
38-
trackingCategory={TRACKING_CATEGORY}
3937
/>
4038
);
4139
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/ftux.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { useMemo, useState } from "react";
55
import type { ThirdwebClient } from "thirdweb";
66
import type { Project } from "@/api/projects";
77
import { Button } from "@/components/ui/button";
8+
import { CreateVaultAccountButton } from "../../../vault/components/create-vault-account.client";
89
import CreateServerWallet from "../server-wallets/components/create-server-wallet.client";
910
import type { Wallet } from "../server-wallets/wallet-table/types";
10-
import CreateVaultAccountButton from "../vault/components/create-vault-account.client";
1111
import { SendTestTransaction } from "./send-test-tx.client";
1212
import { deleteUserAccessToken } from "./utils";
1313

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/tx-chart/tx-chart-ui.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function EmptyChartContent(props: {
184184
<Button
185185
onClick={() => {
186186
router.push(
187-
`/team/${props.teamSlug}/${props.project.slug}/engine/cloud/vault`,
187+
`/team/${props.teamSlug}/${props.project.slug}/vault`,
188188
);
189189
}}
190190
variant="primary"

0 commit comments

Comments
 (0)