flockstr/app/(app)/_layout/Header.tsx

36 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-10-25 08:05:12 -04:00
import Link from "next/link";
import AuthActions from "./components/AuthActions";
2023-10-14 12:09:44 -04:00
import Logo from "@/assets/Logo";
import dynamic from "next/dynamic";
const Search = dynamic(() => import("./components/Search"), {
ssr: false,
});
2023-10-13 19:02:59 -04:00
export default function Header() {
return (
<header className="flex h-[var(--header-height)] shrink-0 grow-0 ">
2023-10-13 23:02:58 -04:00
<div className="fixed z-header flex h-[var(--header-height)] w-full grow border-b bg-background p-5 sm:w-[calc(100vw_-_var(--sidebar-closed-width))] sm:border-b-0 sm:py-0 xl:w-[calc(100vw_-_var(--sidebar-open-width))]">
2023-10-13 19:02:59 -04:00
<div className="flex flex-1 items-stretch justify-between gap-x-4 sm:border-b">
2023-10-25 08:05:12 -04:00
<Link
href="/app"
className="center justify-between gap-x-3 text-foreground"
>
2023-10-14 18:57:37 -04:00
<Logo className="h-[30px] w-[30px] text-primary sm:hidden" />
2023-10-14 22:51:37 -04:00
<div className="font-condensed text-xl font-semibold text-foreground xl:hidden">
Flockstr
2023-10-13 19:02:59 -04:00
</div>
2023-10-25 08:05:12 -04:00
</Link>
2023-10-14 22:51:37 -04:00
<div className="flex grow items-center justify-end gap-x-4 xl:justify-between">
<div className="hidden sm:flex">
2023-10-13 19:02:59 -04:00
<Search />
2023-10-14 22:51:37 -04:00
</div>
<div className="flex items-center gap-x-4">
<AuthActions />
2023-10-13 19:02:59 -04:00
</div>
</div>
</div>
</div>
</header>
);
}