2023-10-17 11:57:27 +03:00
|
|
|
import Link from "next/link";
|
|
|
|
|
2023-10-26 10:48:41 +03:00
|
|
|
import { QuivrLogo } from "@/lib/assets/QuivrLogo";
|
2023-10-20 16:38:35 +03:00
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
2023-10-17 11:57:27 +03:00
|
|
|
import { PopoverMenuMobile } from "./components/PopoverMenuMobile";
|
2023-10-24 14:55:42 +03:00
|
|
|
import { useHomeHeader } from "./hooks/useHomeHeader";
|
|
|
|
import { linkStyle } from "./styles";
|
2023-10-17 11:57:27 +03:00
|
|
|
|
2023-10-20 16:38:35 +03:00
|
|
|
type HomeNavProps = {
|
|
|
|
color?: "white" | "black";
|
|
|
|
};
|
|
|
|
|
|
|
|
export const HomeHeader = ({ color = "white" }: HomeNavProps): JSX.Element => {
|
2023-10-24 14:55:42 +03:00
|
|
|
const { navLinks } = useHomeHeader({ color });
|
2023-10-20 16:38:35 +03:00
|
|
|
|
|
|
|
return (
|
|
|
|
<header className="w-screen flex justify-between items-center p-5 min-w-max md:max-w-6xl m-auto">
|
2023-10-17 11:57:27 +03:00
|
|
|
<Link
|
2023-10-20 16:38:35 +03:00
|
|
|
href="/"
|
|
|
|
className={cn(
|
|
|
|
"text-3xl flex gap-2 items-center",
|
|
|
|
linkStyle[color],
|
|
|
|
color === "black" ? "hover:text-black" : "hover:text-white"
|
|
|
|
)}
|
2023-10-17 11:57:27 +03:00
|
|
|
>
|
2023-10-20 16:38:35 +03:00
|
|
|
<QuivrLogo size={64} color={color} />
|
|
|
|
<div>Quivr</div>
|
2023-10-17 11:57:27 +03:00
|
|
|
</Link>
|
2023-10-20 16:38:35 +03:00
|
|
|
<div className="hidden md:flex">
|
|
|
|
<ul className="flex gap-4 items-center">{navLinks("desktop")}</ul>
|
|
|
|
</div>
|
|
|
|
<div className="md:hidden z-10">
|
|
|
|
<PopoverMenuMobile navLinks={navLinks("mobile")} color={color} />
|
|
|
|
</div>
|
|
|
|
</header>
|
2023-10-17 11:57:27 +03:00
|
|
|
);
|
|
|
|
};
|