diff --git a/frontend/src/components/Footer.jsx b/frontend/src/components/Footer.jsx index 604ba0a..9166a48 100644 --- a/frontend/src/components/Footer.jsx +++ b/frontend/src/components/Footer.jsx @@ -1,6 +1,20 @@ -import { Link } from 'react-router-dom' +import { Link, useLocation } from 'react-router-dom' +import { useAuth } from '../context/AuthContext' export default function Footer() { + const { pathname } = useLocation() + const { user } = useAuth() + const isLoggedIn = !!user + + function FooterLink({ to, children, className=''}) { + return pathname === to ? ( + {children} + ) : ( + + {children} + + ) + } return (