Skip to content

Commit 01116bb

Browse files
committed
consolidate gateway navbar (#8411)
# [Dashboard] Feature: Reorganize Gateway section in project sidebar ## Notes for the reviewer This PR reorganizes the project sidebar by: - Creating a new "Gateway" submenu that contains both RPC and Indexer (formerly Insight) - Moving the Insight page to Gateway/Indexer - Simplifying the Indexer FTUX component - Updating all related file paths and imports ## How to test Navigate to the project sidebar and verify: - The Gateway submenu appears with RPC and Indexer options - The former Insight page now appears under Gateway/Indexer - All functionality continues to work as expected <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Indexer page and onboarding card; introduced Gateway submenu grouping RPC and Indexer. * Introduced a Wallets submenu consolidating wallet-related links; added a Bridge link and highlighted a monetization item with a "New" badge. * Sidebar now shows an Engine link when dedicated engines exist. * **Refactor** * Removed standalone Insight product/page and its onboarding card. * Simplified engine onboarding and empty-state flow. * **Chores** * Added redirects routing old insight/rpc paths to gateway equivalents. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on restructuring the `dashboard` application by reorganizing components and updating routes. It removes unused files, modifies imports, and adjusts the sidebar layout to improve navigation and functionality. ### Detailed summary - Deleted several unused components related to `insight`. - Moved `RpcAnalytics` and `MethodsTable` to a new path under `gateway`. - Updated `loginRedirect` paths in several components. - Added a new `InsightFTUX` component. - Adjusted sidebar links and layout to reflect new component structure. - Removed references to `InsightIcon` and related logic in various files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent f07b4b5 commit 01116bb

File tree

22 files changed

+233
-457
lines changed

22 files changed

+233
-457
lines changed

apps/dashboard/redirects.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ const projectPageRedirects = [
115115
permanent: false,
116116
source: `${projectRoute}/connect/analytics`,
117117
},
118+
{
119+
destination: `${projectRoute}/gateway/indexer/:path*`,
120+
permanent: false,
121+
source: `${projectRoute}/insight/:path*`,
122+
},
123+
{
124+
destination: `${projectRoute}/gateway/rpc/:path*`,
125+
permanent: false,
126+
source: `${projectRoute}/rpc/:path*`,
127+
},
118128
];
119129

120130
const teamPageRedirects = [

apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/products.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ConnectSDKIcon } from "@/icons/ConnectSDKIcon";
22
import { ContractIcon } from "@/icons/ContractIcon";
33
import { EngineIcon } from "@/icons/EngineIcon";
4-
import { InsightIcon } from "@/icons/InsightIcon";
54
import { NebulaIcon } from "@/icons/NebulaIcon";
65
import { PayIcon } from "@/icons/PayIcon";
76
import { RPCIcon } from "@/icons/RPCIcon";
@@ -51,13 +50,6 @@ export const products = [
5150
link: "https://portal.thirdweb.com/payments",
5251
name: "Payments",
5352
},
54-
{
55-
description: "Query and analyze blockchain data",
56-
icon: InsightIcon,
57-
id: "insight",
58-
link: "https://thirdweb.com/insight",
59-
name: "Insight",
60-
},
6153
{
6254
description: "The most powerful AI for interacting with the blockchain",
6355
icon: NebulaIcon,

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { TypeScriptIcon } from "@/icons/brand-icons/TypeScriptIcon";
1313
import { UnityIcon } from "@/icons/brand-icons/UnityIcon";
1414
import { UnrealIcon } from "@/icons/brand-icons/UnrealIcon";
1515
import { ContractIcon } from "@/icons/ContractIcon";
16-
import { InsightIcon } from "@/icons/InsightIcon";
1716
import { PayIcon } from "@/icons/PayIcon";
1817
import { ClientIDSection } from "./ClientIDSection";
1918
import { SecretKeySection } from "./SecretKeySection";
@@ -111,13 +110,6 @@ function ProductsSection(props: { teamSlug: string; projectSlug: string }) {
111110
icon: ContractIcon,
112111
title: "Contracts",
113112
},
114-
{
115-
description:
116-
"Add indexing capabilities to retrieve real-time onchain data",
117-
href: `/team/${props.teamSlug}/${props.projectSlug}/insight`,
118-
icon: InsightIcon,
119-
title: "Insight",
120-
},
121113
{
122114
description:
123115
"Bridge, swap, and purchase cryptocurrencies with any fiat options or tokens via cross-chain routing",

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

Lines changed: 49 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +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";
18-
import { InsightIcon } from "@/icons/InsightIcon";
1917
import { NebulaIcon } from "@/icons/NebulaIcon";
2018
import { PayIcon } from "@/icons/PayIcon";
2119
import { TokenIcon } from "@/icons/TokenIcon";
@@ -24,6 +22,7 @@ import { WalletProductIcon } from "@/icons/WalletProductIcon";
2422
export function ProjectSidebarLayout(props: {
2523
layoutPath: string;
2624
children: React.ReactNode;
25+
hasEngines: boolean;
2726
}) {
2827
const contentSidebarLinks = [
2928
{
@@ -36,91 +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+
),
7565
},
7666
{
77-
group: "Monetize",
78-
links: [
79-
{
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-
),
87-
},
88-
{
89-
href: `${props.layoutPath}/bridge`,
90-
icon: BridgeIcon,
91-
label: "Bridge",
92-
},
93-
{
94-
href: `${props.layoutPath}/tokens`,
95-
icon: TokenIcon,
96-
label: "Tokens",
97-
},
98-
],
67+
href: `${props.layoutPath}/bridge`,
68+
icon: BridgeIcon,
69+
label: "Bridge",
9970
},
10071
{
101-
separator: true,
72+
href: `${props.layoutPath}/tokens`,
73+
icon: TokenIcon,
74+
label: "Tokens",
10275
},
10376
{
104-
group: "Scale",
77+
href: `${props.layoutPath}/ai`,
78+
icon: NebulaIcon,
79+
label: "AI",
80+
},
81+
{
82+
subMenu: {
83+
icon: RssIcon,
84+
label: "Gateway",
85+
},
10586
links: [
10687
{
107-
href: `${props.layoutPath}/insight`,
108-
icon: InsightIcon,
109-
label: "Insight",
88+
href: `${props.layoutPath}/gateway/rpc`,
89+
label: "RPC",
11090
},
11191
{
112-
href: `${props.layoutPath}/rpc`,
113-
icon: RssIcon,
114-
label: "RPC",
92+
href: `${props.layoutPath}/gateway/indexer`,
93+
label: "Indexer",
11594
},
116-
// linkely want to move this to `team` level eventually
11795
{
118-
href: `${props.layoutPath}/engine`,
119-
icon: DatabaseIcon,
120-
label: "Engine",
96+
href: `${props.layoutPath}/contracts`,
97+
label: "Contracts",
12198
},
12299
],
123100
},
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",
108+
},
109+
]
110+
: []),
124111
] satisfies ShadcnSidebarLink[];
125112

126113
const footerSidebarLinks = [

0 commit comments

Comments
 (0)