"use client"; import { Icon } from "@iconify/react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useMemo, useState } from "react"; import { Avatar, AvatarFallback, AvatarImage, Separator } from "poyraz-ui/atoms"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger, } from "poyraz-ui/molecules"; import { SearchCommand } from "@/components/search-command"; import { NAV_LINKS, SOCIAL_LINKS } from "@/lib/links"; function getNavLinkClass(isActive: boolean) { return [ "inline-flex border-b-2 pb-1 text-sm transition-colors", isActive ? "border-red-600 text-foreground" : "border-transparent text-foreground/55 hover:text-foreground", ].join(" "); } export function SiteNavbar() { const pathname = usePathname(); const [searchOpen, setSearchOpen] = useState(false); const shortcut = useMemo(() => { if (typeof window === "undefined") return "Ctrl K"; const isMac = /(Mac|iPhone|iPad)/i.test(window.navigator.platform); return isMac ? "Cmd K" : "Ctrl K"; }, []); const isActiveLink = (href: string) => { if (href === "/") return pathname === "/"; return pathname === href || pathname.startsWith(`${href}/`); }; return (
PA
Social Social Links {SOCIAL_LINKS.map((item) => ( {item.label} ))}
Menu Mobile Menu
{SOCIAL_LINKS.map((item) => ( {item.label} ))}
); }