From e80fa9f603266ccf7f7c6bf5ccd02615628ce88b Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 19 Nov 2022 11:06:58 +0000 Subject: [PATCH] Add navbar --- src/components/Layout.js | 9 ++++++++- src/components/NavBar.js | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/components/NavBar.js diff --git a/src/components/Layout.js b/src/components/Layout.js index ecfa82c..d748d2a 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -1,3 +1,10 @@ +import NavBar from "./NavBar"; + export default function Layout({ children }) { - return
{children}
; + return ( +
+ +
{children}
+
+ ); } diff --git a/src/components/NavBar.js b/src/components/NavBar.js new file mode 100644 index 0000000..5a81b3c --- /dev/null +++ b/src/components/NavBar.js @@ -0,0 +1,25 @@ +import { Navbar, Text } from "@nextui-org/react"; +import { useSession } from "next-auth/react"; + +export default function NavBar() { + const { data: session, status } = useSession(); + + return ( + + + + Imageify + + + + {status === "authenticated" ? ( +

signed in

+ ) : ( + + Login + + )} +
+
+ ); +}