diff --git a/client/src/containers/footer/component.tsx b/client/src/containers/footer/component.tsx index 146c3a8..200c0a6 100644 --- a/client/src/containers/footer/component.tsx +++ b/client/src/containers/footer/component.tsx @@ -6,6 +6,8 @@ import Image from 'next/image'; import Link from 'next/link'; import { useRouter } from 'next/router'; +import { useSession } from 'next-auth/react'; + import { NAV, POLICIES } from 'constants/nav'; import Wrapper from 'containers/wrapper'; @@ -18,9 +20,13 @@ import TWITTER_SVG from 'svgs/social/twitter.svg?sprite'; const Footer = () => { const { pathname } = useRouter(); + const { data: session } = useSession(); const hideNav = useMemo(() => { return pathname.includes('/auth'); }, [pathname]); + const NAV_ITEMS = useMemo(() => { + return NAV.filter((n) => !(session && n.auth)); + }, [session]); return (