From a7df4f360af88f922c64185110b28b71294458ec Mon Sep 17 00:00:00 2001 From: saml33 Date: Mon, 19 Aug 2024 12:19:31 +1000 Subject: [PATCH] add calculator to top nav --- components/Layout.tsx | 12 ++++++++++-- components/TopBar.tsx | 6 +++++- pages/yield-calculator.tsx | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/components/Layout.tsx b/components/Layout.tsx index 39a5ae1..2ef37af 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -31,7 +31,11 @@ const Layout = ({ children }: { children: ReactNode }) => { const { asPath } = useRouter() const isDashboardLayout = useMemo(() => { - return asPath === '/dashboard' || asPath === '/stats' + return ( + asPath === '/dashboard' || + asPath === '/stats' || + asPath === '/yield-calculator' + ) }, [asPath]) const [mounted, setMounted] = useState(false) @@ -48,7 +52,11 @@ const Layout = ({ children }: { children: ReactNode }) => { {isDashboardLayout ? ( <> -
+
{children}
diff --git a/components/TopBar.tsx b/components/TopBar.tsx index 4e07ca5..9270834 100644 --- a/components/TopBar.tsx +++ b/components/TopBar.tsx @@ -52,7 +52,11 @@ const TopBar = () => { path="/stats" text="Stats" /> - {/* */} + ) : null}
diff --git a/pages/yield-calculator.tsx b/pages/yield-calculator.tsx index 05b79b1..6870083 100644 --- a/pages/yield-calculator.tsx +++ b/pages/yield-calculator.tsx @@ -4,7 +4,7 @@ import Link from 'next/link' const YieldCalc: NextPage = () => { return ( -
+

Yield calculator