diff --git a/src/components/navigation/MobileNavigation.tsx b/src/components/navigation/MobileNavigation.tsx index 5041cdc..e9cb630 100644 --- a/src/components/navigation/MobileNavigation.tsx +++ b/src/components/navigation/MobileNavigation.tsx @@ -4,6 +4,8 @@ import LanguageSwitcher from "../language/LanguageSwitcher"; import Image from "next/image"; import { Murecho } from "next/font/google"; import { useTranslations } from "next-intl"; +import { usePathname } from "next/navigation"; +import Link from "next/link"; const murecho = Murecho({ subsets: ["latin", "cyrillic"] }); @@ -13,13 +15,21 @@ export default function MobileNavigation() { const [mainComponentHeight, setMainComponentHeight] = useState(0); const mainComponentRef = useRef(null); + const pathname = usePathname(); + const lang = pathname.substring(1, 3); + function toggle() { setShowMe(!showMe); } + function close() { + setTimeout(() => { + setShowMe(false); + }, 300); + } useEffect(() => { if (mainComponentRef.current) { - let component = mainComponentRef.current as any + let component = mainComponentRef.current as any; setMainComponentHeight(component.offsetHeight); } }, []); @@ -30,13 +40,15 @@ export default function MobileNavigation() { ref={mainComponentRef} className={`flex flex-column bg-white justify-between items-center ${styles.mainComponent}`} > - AploCoin logo + + AploCoin logo +