2025-09-26 09:04:18 +02:00
|
|
|
import {notFound} from "next/navigation";
|
2024-11-10 23:12:38 +01:00
|
|
|
|
2025-09-26 09:04:18 +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";
|
2025-09-26 09:04:18 +02:00
|
|
|
import {BreadCrumbsWrapper} from "@/components/wrappers/common/bread-crumbs/bread-crumbs";
|
2025-11-08 20:07:49 +01:00
|
|
|
import GitHubStarsButtonCustom from "@/components/wrappers/common/github/github-button";
|
|
|
|
|
// import GitHubStarsButtonCustom from "@/components/wrappers/common/github-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-09-26 09:04:18 +02:00
|
|
|
<div className="flex items-center justify-between">
|
|
|
|
|
<SidebarTrigger className="-ml-1"/>
|
|
|
|
|
<BreadCrumbsWrapper/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-11-10 11:01:59 +01:00
|
|
|
<div className="flex items-center gap-2">
|
2025-11-08 20:07:49 +01:00
|
|
|
<GitHubStarsButtonCustom/>
|
2025-09-26 09:04:18 +02:00
|
|
|
<ModeToggle/>
|
|
|
|
|
<LoggedInButton/>
|
2024-11-10 11:01:59 +01:00
|
|
|
</div>
|
|
|
|
|
</header>
|
2025-05-16 15:54:17 +02:00
|
|
|
);
|
|
|
|
|
};
|