From d675410a78f0454c8e417a208dead02993560793 Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Wed, 13 Sep 2023 10:24:56 -0700 Subject: [PATCH 1/2] chore: adjust NavbarLinkExternal to be able to be used at top level --- apps/trading/components/navbar/navbar.tsx | 30 +++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/apps/trading/components/navbar/navbar.tsx b/apps/trading/components/navbar/navbar.tsx index 0675fa6d4..904ea9e68 100644 --- a/apps/trading/components/navbar/navbar.tsx +++ b/apps/trading/components/navbar/navbar.tsx @@ -65,14 +65,14 @@ export const Navbar = ({ {/* Left section */} -
{children}
+
{children}
{/* Used to show header in nav on mobile */}
setMenu(null)} />
{/* Right section */} -
+
{ @@ -106,7 +106,7 @@ export const Navbar = ({ onOpenChange={(open) => setMenu((x) => (open ? x : null))} > -
+
setMenu(null)}> {t('Close menu')} @@ -186,17 +186,9 @@ const NavbarMenu = ({ onClick }: { onClick: () => void }) => { - - - {t('Governance')} - - + + {t('Governance')} + {t('Resources')} @@ -355,7 +347,7 @@ const NavbarLinkExternal = ({ {children} - + ); @@ -383,8 +375,8 @@ const BurgerIcon = () => ( const NavbarListDivider = () => { return ( -
-
+
+
); }; From 13b1269a587af16df71027c7c131c4c9baeee0a3 Mon Sep 17 00:00:00 2001 From: Madalina Raicu Date: Wed, 13 Sep 2023 18:51:39 +0100 Subject: [PATCH 2/2] chore: update navbar spec --- apps/trading/components/navbar/navbar.spec.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/trading/components/navbar/navbar.spec.tsx b/apps/trading/components/navbar/navbar.spec.tsx index cb8d40a87..4589f5d98 100644 --- a/apps/trading/components/navbar/navbar.spec.tsx +++ b/apps/trading/components/navbar/navbar.spec.tsx @@ -57,6 +57,7 @@ describe('Navbar', () => { ['/markets/all', 'Markets'], [`/markets/${marketId}`, 'Trading'], ['/portfolio', 'Portfolio'], + ['/', 'Governance'], ]; const links = screen.getAllByRole('link'); @@ -88,6 +89,7 @@ describe('Navbar', () => { ['/markets/all', 'Markets'], [`/markets/${marketId}`, 'Trading'], ['/portfolio', 'Portfolio'], + ['/', 'Governance'], ]; const links = menu.getAllByRole('link'); links.forEach((link, i) => {