mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
hamburger close on footer item click
This commit is contained in:
@@ -5,10 +5,13 @@ import { FaGithub, FaRegEnvelope } from "react-icons/fa";
|
|||||||
|
|
||||||
import { Link, usePathname } from "@/utils/navigation";
|
import { Link, usePathname } from "@/utils/navigation";
|
||||||
|
|
||||||
|
import { useSetAtom } from "jotai";
|
||||||
|
import { burgerMenuIsOpenAtom } from "@/atoms";
|
||||||
import ThemeSwitcher from "./ThemeSwitcher";
|
import ThemeSwitcher from "./ThemeSwitcher";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
const t = useTranslations("Footer");
|
const t = useTranslations("Footer");
|
||||||
|
const setBurgerMenuIsOpen = useSetAtom(burgerMenuIsOpenAtom);
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -16,7 +19,7 @@ export default function Footer() {
|
|||||||
className="fixed bottom-0 z-30 flex h-12 w-[100vw] flex-col items-center justify-center justify-items-center bg-primary-600 px-5 py-2 text-white dark:bg-gray-700"
|
className="fixed bottom-0 z-30 flex h-12 w-[100vw] flex-col items-center justify-center justify-items-center bg-primary-600 px-5 py-2 text-white dark:bg-gray-700"
|
||||||
data-test="footer"
|
data-test="footer"
|
||||||
>
|
>
|
||||||
<div className="flex items-center py-2 hover:[&_a]:opacity-80">
|
<div className="flex items-center py-2 hover:[&_a]:opacity-80" onClick={() => setBurgerMenuIsOpen(false)}>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/TheRealOwenRees/echecsfrance"
|
href="https://github.com/TheRealOwenRees/echecsfrance"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { Dispatch, RefObject, SetStateAction, useRef, useState } from "react";
|
|
||||||
|
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|||||||
Reference in New Issue
Block a user