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