blob: f830beb66ef377b9e6f198feaf0b23fe0d2ac5c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import Link from "next/link";
import { redirect } from "next/navigation";
import GlobalActions from "@/components/dashboard/GlobalActions";
import ProfileOptions from "@/components/dashboard/header/ProfileOptions";
import { SearchInput } from "@/components/dashboard/search/SearchInput";
import KarakeepLogo from "@/components/KarakeepIcon";
import { getServerAuthSession } from "@/server/auth";
export default async function Header() {
const session = await getServerAuthSession();
if (!session) {
redirect("/");
}
return (
<header className="sticky left-0 right-0 top-0 z-50 flex h-16 items-center justify-between overflow-x-auto overflow-y-hidden bg-background p-4 shadow">
<div className="hidden items-center sm:flex">
<Link href={"/dashboard/bookmarks"} className="w-56">
<KarakeepLogo height={38} />
</Link>
</div>
<div className="flex flex-1 gap-2">
<SearchInput className="min-w-40 rounded-md bg-muted" />
<GlobalActions />
</div>
<div className="flex items-center">
<ProfileOptions />
</div>
</header>
);
}
|