diff --git a/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx b/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx index 8693857878a..ce1d48e4363 100644 --- a/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx +++ b/apps/dashboard/src/@/components/blocks/SidebarLayout.tsx @@ -4,9 +4,11 @@ import { SidebarFooter, SidebarGroup, SidebarGroupContent, + SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, + SidebarMenuSubItem, SidebarRail, SidebarSeparator, SidebarTrigger, @@ -66,23 +68,13 @@ export function FullWidthSidebarLayout(props: { > {/* left - sidebar */} - - - - - - + + {footerSidebarLinks && ( - + )} @@ -106,17 +98,29 @@ export function FullWidthSidebarLayout(props: { function RenderSidebarGroup(props: { sidebarLinks: SidebarLink[]; - groupName: string | undefined; + groupName: string; }) { - const { sidebarLinks } = props; - const sidebar = useSidebar(); + return ( + + + {props.groupName} + + + + + + ); +} +function RenderSidebarMenu(props: { links: SidebarLink[] }) { + const sidebar = useSidebar(); return ( - {sidebarLinks.map((link) => { + {props.links.map((link, idx) => { + // link if ("href" in link) { return ( - + {link.label} - + ); } + // separator if ("separator" in link) { - return ; + return ( + + ); } + // group return ( { + return ( + pathname.startsWith(`${layoutPath}/transactions`) || + pathname.startsWith(`${layoutPath}/engine/dedicated`) + ); + }, + label: "Transactions", + }, + { + href: `${layoutPath}/contracts`, + icon: ContractIcon, + label: "Contracts", + }, + ], }, { - href: `${layoutPath}/tokens`, - icon: CoinsIcon, - label: ( - - Tokens New - - ), + separator: true, }, { - href: - engineLinkType === "cloud" - ? `${layoutPath}/transactions` - : `${layoutPath}/engine/dedicated`, - icon: ArrowLeftRightIcon, - isActive: (pathname) => { - return ( - pathname.startsWith(`${layoutPath}/transactions`) || - pathname.startsWith(`${layoutPath}/engine/dedicated`) - ); - }, - label: "Transactions", + group: "Monetize", + links: [ + { + href: `${layoutPath}/universal-bridge`, + icon: PayIcon, + label: "Universal Bridge", + }, + { + href: `${layoutPath}/tokens`, + icon: CoinsIcon, + label: ( + + Tokens New + + ), + }, + ], }, { - href: `${layoutPath}/insight`, - icon: InsightIcon, - label: "Insight", + separator: true, }, { - href: `${layoutPath}/vault`, - icon: LockIcon, - label: "Vault", + group: "Scale", + links: [ + { + href: `${layoutPath}/insight`, + icon: InsightIcon, + label: "Insight", + }, + { + href: `${layoutPath}/account-abstraction`, + icon: SmartAccountIcon, + label: "Account Abstraction", + }, + { + href: `${layoutPath}/vault`, + icon: LockIcon, + label: "Vault", + }, + ], }, ]} footerSidebarLinks={[