Add navbar
This commit is contained in:
parent
0047f31cd5
commit
e80fa9f603
@ -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
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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user