Skip to content

Commit 9603aa4

Browse files
committed
Refactor sidebar links and update project redirects
Simplifies the ProjectSidebarLayout by flattening the sidebar link structure, moving 'Contracts' under the 'Gateway' submenu, and removing the 'Build', 'Monetize', and 'Scale' groupings. Updates project page redirects to match new gateway route structure for 'rpc' and 'indexer' paths.
1 parent 8317f1d commit 9603aa4

File tree

2 files changed

+55
-78
lines changed

2 files changed

+55
-78
lines changed

apps/dashboard/redirects.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ const projectPageRedirects = [
116116
source: `${projectRoute}/connect/analytics`,
117117
},
118118
{
119-
destination: `${projectRoute}/insight/:path*`,
119+
destination: `${projectRoute}/gateway/indexer/:path*`,
120120
permanent: false,
121-
source: `${projectRoute}/gateway/indexer/:path*`,
121+
source: `${projectRoute}/insight/:path*`,
122122
},
123123
{
124-
destination: `${projectRoute}/rpc/:path*`,
124+
destination: `${projectRoute}/gateway/rpc/:path*`,
125125
permanent: false,
126-
source: `${projectRoute}/gateway/rpc/:path*`,
126+
source: `${projectRoute}/rpc/:path*`,
127127
},
128128
];
129129

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

Lines changed: 51 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
type ShadcnSidebarLink,
1515
} from "@/components/blocks/full-width-sidebar-layout";
1616
import { BridgeIcon } from "@/icons/BridgeIcon";
17-
import { ContractIcon } from "@/icons/ContractIcon";
1817
import { NebulaIcon } from "@/icons/NebulaIcon";
1918
import { PayIcon } from "@/icons/PayIcon";
2019
import { TokenIcon } from "@/icons/TokenIcon";
@@ -36,101 +35,79 @@ export function ProjectSidebarLayout(props: {
3635
separator: true,
3736
},
3837
{
39-
group: "Build",
38+
subMenu: {
39+
icon: WalletProductIcon,
40+
label: "Wallets",
41+
},
4042
links: [
4143
{
42-
subMenu: {
43-
icon: WalletProductIcon,
44-
label: "Wallets",
45-
},
46-
links: [
47-
{
48-
href: `${props.layoutPath}/wallets/user-wallets`,
49-
label: "User Wallets",
50-
},
51-
{
52-
href: `${props.layoutPath}/wallets/server-wallets`,
53-
label: "Server Wallets",
54-
},
55-
{
56-
href: `${props.layoutPath}/wallets/sponsored-gas`,
57-
label: "Gas Sponsorship",
58-
},
59-
],
44+
href: `${props.layoutPath}/wallets/user-wallets`,
45+
label: "User Wallets",
6046
},
6147
{
62-
href: `${props.layoutPath}/contracts`,
63-
icon: ContractIcon,
64-
label: "Contracts",
48+
href: `${props.layoutPath}/wallets/server-wallets`,
49+
label: "Server Wallets",
6550
},
6651
{
67-
href: `${props.layoutPath}/ai`,
68-
icon: NebulaIcon,
69-
label: "AI",
52+
href: `${props.layoutPath}/wallets/sponsored-gas`,
53+
label: "Gas Sponsorship",
7054
},
7155
],
7256
},
7357
{
74-
separator: true,
58+
href: `${props.layoutPath}/x402`,
59+
icon: PayIcon,
60+
label: (
61+
<span className="flex items-center gap-2">
62+
x402 <Badge>New</Badge>
63+
</span>
64+
),
65+
},
66+
{
67+
href: `${props.layoutPath}/bridge`,
68+
icon: BridgeIcon,
69+
label: "Bridge",
70+
},
71+
{
72+
href: `${props.layoutPath}/tokens`,
73+
icon: TokenIcon,
74+
label: "Tokens",
7575
},
7676
{
77-
group: "Monetize",
77+
href: `${props.layoutPath}/ai`,
78+
icon: NebulaIcon,
79+
label: "AI",
80+
},
81+
{
82+
subMenu: {
83+
icon: RssIcon,
84+
label: "Gateway",
85+
},
7886
links: [
7987
{
80-
href: `${props.layoutPath}/x402`,
81-
icon: PayIcon,
82-
label: (
83-
<span className="flex items-center gap-2">
84-
x402 <Badge>New</Badge>
85-
</span>
86-
),
88+
href: `${props.layoutPath}/gateway/rpc`,
89+
label: "RPC",
8790
},
8891
{
89-
href: `${props.layoutPath}/bridge`,
90-
icon: BridgeIcon,
91-
label: "Bridge",
92+
href: `${props.layoutPath}/gateway/indexer`,
93+
label: "Indexer",
9294
},
9395
{
94-
href: `${props.layoutPath}/tokens`,
95-
icon: TokenIcon,
96-
label: "Tokens",
96+
href: `${props.layoutPath}/contracts`,
97+
label: "Contracts",
9798
},
9899
],
99100
},
100-
{
101-
separator: true,
102-
},
103-
{
104-
group: "Scale",
105-
links: [
106-
{
107-
subMenu: {
108-
icon: RssIcon,
109-
label: "Gateway",
101+
// only show engine link if there the user already has an engine instance
102+
...(props.hasEngines
103+
? [
104+
{
105+
href: `${props.layoutPath}/engine`,
106+
icon: DatabaseIcon,
107+
label: "Engine",
110108
},
111-
links: [
112-
{
113-
href: `${props.layoutPath}/gateway/rpc`,
114-
label: "RPC",
115-
},
116-
{
117-
href: `${props.layoutPath}/gateway/indexer`,
118-
label: "Indexer",
119-
},
120-
],
121-
},
122-
// only show engine link if there the user already has an engine instance
123-
...(props.hasEngines
124-
? [
125-
{
126-
href: `${props.layoutPath}/engine`,
127-
icon: DatabaseIcon,
128-
label: "Engine",
129-
},
130-
]
131-
: []),
132-
],
133-
},
109+
]
110+
: []),
134111
] satisfies ShadcnSidebarLink[];
135112

136113
const footerSidebarLinks = [

0 commit comments

Comments
 (0)