diff --git a/frontend/src/components/layout/BottomNav.tsx b/frontend/src/components/layout/BottomNav.tsx index d172f70..b5bbf40 100644 --- a/frontend/src/components/layout/BottomNav.tsx +++ b/frontend/src/components/layout/BottomNav.tsx @@ -1,7 +1,14 @@ import { NavLink } from 'react-router' import { Home, Search, PlusCircle, ShoppingCart, User } from 'lucide-react' +import { useAuth } from '../../context/AuthContext' -const navItems = [ +const publicItems = [ + { to: '/', icon: Home, label: 'Home' }, + { to: '/search', icon: Search, label: 'Suche' }, + { to: '/profile', icon: User, label: 'Profil' }, +] + +const authItems = [ { to: '/', icon: Home, label: 'Home' }, { to: '/search', icon: Search, label: 'Suche' }, { to: '/new', icon: PlusCircle, label: 'Neu' }, @@ -10,6 +17,9 @@ const navItems = [ ] export function BottomNav() { + const { isAuthenticated } = useAuth() + const navItems = isAuthenticated ? authItems : publicItems + return (