From 01d4be4d6d8c30596d25557f03f1db47d382025b Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Tue, 3 Sep 2024 22:51:45 +0100 Subject: [PATCH] Nav buttons --- src/app/layout.tsx | 2 +- src/components/header.tsx | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c8fa20d..d0b0ab9 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -36,7 +36,7 @@ export default function RootLayout({ -
+
{children}
diff --git a/src/components/header.tsx b/src/components/header.tsx index e46e172..8c7c159 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -1,22 +1,25 @@ -"use client"; -import { useMemo } from "react"; -import { usePathname } from "next/navigation"; import Link from "next/link"; import { ThemeToggle } from "~/components/theme-toggle"; +import { Button } from "~/components/ui/button"; -export function Header() { - const pathname = usePathname(); - - const isHomePage = useMemo(() => pathname === "/", [pathname]); +const navItems: Array<{ + label: string; + href: string; +}> = [ + { label: "Home", href: "/" }, + { label: "Forecast", href: "/forecast" }, +]; +export function Header() { return (
-