"use client"; import { Logo } from "../Logo"; import { NavBarItem } from "./navbar-item"; import { useMotionValueEvent, useScroll, motion, AnimatePresence, } from "framer-motion"; import { cn } from "@/lib/utils"; import { useState } from "react"; type Props = { navItems: { link: string; title: string; target?: "_blank"; }[]; }; export const DesktopNavbar = ({ navItems }: Props) => { const { scrollY } = useScroll(); const [showBackground, setShowBackground] = useState(false); useMotionValueEvent(scrollY, "change", (value) => { if (value > 100) { setShowBackground(true); } else { setShowBackground(false); } }); return (
{showBackground && ( )}
{navItems.map((item) => ( {item.title} ))}
{/* Login/Signup buttons - uncomment to enable authentication */} {/* */}
); };