feat: working login and logged out
This commit is contained in:
+14
-3
@@ -1,11 +1,22 @@
|
||||
const links = [
|
||||
const loggedOutLinks = [
|
||||
{ href: "/", label: "Home" },
|
||||
{ href: "/sign-in", label: "Sign in" },
|
||||
{ href: "/sign-up", label: "Sign up" },
|
||||
{ href: "/dashboard", label: "Dashboard" },
|
||||
];
|
||||
|
||||
export default function Header() {
|
||||
const loggedInLinks = [
|
||||
{ href: "/", label: "Home" },
|
||||
{ href: "/dashboard", label: "Dashboard" },
|
||||
{ href: "/sign-out", label: "Sign out" },
|
||||
];
|
||||
|
||||
export interface Props {
|
||||
loggedIn: boolean;
|
||||
}
|
||||
|
||||
export default function Header(props: Props) {
|
||||
const links = props.loggedIn ? loggedInLinks : loggedOutLinks;
|
||||
|
||||
return (
|
||||
<div class="navbar bg-base-100 shadow-sm">
|
||||
<div class="flex-1">
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface Props {
|
||||
children: string;
|
||||
}
|
||||
|
||||
export default function Headline(props: Props) {
|
||||
return <h1 class="text-2xl font-bold">{props.children}</h1>;
|
||||
}
|
||||
Reference in New Issue
Block a user