2024-11-10 11:01:59 +01:00
|
|
|
import {notFound} from "next/navigation";
|
2024-11-10 23:12:38 +01:00
|
|
|
|
|
|
|
|
import {currentUser} from "@/auth/current-user";
|
2024-12-16 11:55:16 +01:00
|
|
|
import {LoggedInButton} from "@/components/wrappers/dashboard/LoggedInButton/LoggedInButton";
|
2024-11-10 11:01:59 +01:00
|
|
|
import {SidebarTrigger} from "@/components/ui/sidebar";
|
|
|
|
|
import {ModeToggle} from "@/features/theme/ModeToggle";
|
|
|
|
|
|
|
|
|
|
export const Header = async () => {
|
|
|
|
|
const user = await currentUser()
|
|
|
|
|
if (!user) {
|
|
|
|
|
return notFound()
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<header className="flex h-16 shrink-0 items-center justify-between border-b px-4">
|
|
|
|
|
<SidebarTrigger className="-ml-1"/>
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<ModeToggle/>
|
|
|
|
|
<LoggedInButton/>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
}
|