Add navbar

This commit is contained in:
Lee 2022-11-19 11:06:58 +00:00
parent 0047f31cd5
commit e80fa9f603
No known key found for this signature in database
GPG Key ID: 6EA25896ECCB3121
2 changed files with 33 additions and 1 deletions

@ -1,3 +1,10 @@
import NavBar from "./NavBar";
export default function Layout({ children }) {
return <div className="h-screen bg-[#080808] text-white">{children}</div>;
return (
<div className="bg-[#080808] text-white">
<NavBar></NavBar>
<div className="h-screen">{children}</div>
</div>
);
}

25
src/components/NavBar.js Normal file

@ -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 (
<Navbar isBordered variant={"static"}>
<Navbar.Brand>
<Text b color="inherit">
Imageify
</Text>
</Navbar.Brand>
<Navbar.Content>
{status === "authenticated" ? (
<p>signed in</p>
) : (
<Navbar.Link color="inherit" href="#">
Login
</Navbar.Link>
)}
</Navbar.Content>
</Navbar>
);
}