MCPcopy Create free account
hub / github.com/alanagoyal/docbase / SiteHeader

Function SiteHeader

components/site-header.tsx:14–75  ·  view source on GitHub ↗
({ account }: { account: User })

Source from the content-addressed store, hash-verified

12type User = Database["public"]["Tables"]["users"]["Row"]
13
14export function SiteHeader({ account }: { account: User }) {
15 return (
16 <header className="sticky top-0 z-40 w-full border-b bg-background">
17 <div className="flex h-16 items-center justify-between px-4 sm:px-6 lg:px-8">
18 <div className="flex items-center">
19 <Link href="/" className="hidden md:flex text-2xl font-semibold mr-6">
20 <span
21 style={{
22 backgroundImage:
23 "linear-gradient(48deg, #74EBD5 0%, #9FACE6 100%)",
24 backgroundClip: "text",
25 WebkitBackgroundClip: "text",
26 color: "transparent",
27 }}
28 >
29 Doc
30 </span>
31 base
32 </Link>
33 {account ? (
34 <>
35 <div className="md:hidden mr-2">
36 <MainNav account={account} />
37 </div>
38 <div className="hidden md:block mt-[2px]">
39 <MainNav account={account} />
40 </div>
41 </>
42 ) : null}
43 </div>
44 <div className="flex items-center space-x-4">
45 <Link
46 href={siteConfig.links.github}
47 target="_blank"
48 rel="noreferrer"
49 className="hidden sm:inline-block"
50 >
51 <div
52 className={buttonVariants({
53 size: "sm",
54 variant: "ghost",
55 })}
56 >
57 <Icons.gitHub className="h-5 w-5" />
58 <span className="sr-only">GitHub</span>
59 </div>
60 </Link>
61 <ThemeToggle />
62 {account ? (
63 <UserNav account={account} />
64 ) : (
65 <Link href="/login">
66 <Button variant="ghost" size="sm">
67 Sign In
68 </Button>
69 </Link>
70 )}
71 </div>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected