'use client'; import {navLinks} from "@/constant/Constant"; import Link from "next/link"; import React, {useContext} from "react"; import {CgClose} from "react-icons/cg"; import {ThemeContext} from "@/components/provider/ThemeProvider"; import {useThemeColors} from "@/utils/useThemeColors"; type Props = { showNav: boolean; closeNav: () => void; }; const MobileNav = ({closeNav, showNav}: Props) => { const navOpen = showNav ? "translate-y-0 opacity-100" : "-translate-y-20 opacity-0 pointer-events-none"; const {theme, toggleTheme} = useContext(ThemeContext); const colors = useThemeColors(); const textClass = theme === "dark" ? "text-white" : "text-black"; return (
{navLinks.map((link) => (

{link.label}

))}
); }; export default MobileNav;