diff --git a/components/layout/MobileBottomNav.tsx b/components/layout/MobileBottomNav.tsx
index 153a51c97..a80322180 100644
--- a/components/layout/MobileBottomNav.tsx
+++ b/components/layout/MobileBottomNav.tsx
@@ -3,7 +3,7 @@
import * as React from 'react';
import { usePathname } from 'next/navigation';
import { TransitionLink } from '@/components/ui/TransitionLink';
-import { Home, Briefcase, Users, Mail } from 'lucide-react';
+import { Home, Layers, Star, Mail, Menu } from 'lucide-react';
import { motion, AnimatePresence } from 'framer-motion';
export interface NavLink {
@@ -21,11 +21,18 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
const pathname = usePathname() || '/';
const [isFlyoutOpen, setIsFlyoutOpen] = React.useState(false);
- // We need to gather all links that should go into the flyout.
- // The user wants 'alle navigationspunkte daraus' (from the old burger menu).
- // Old menu had: Kompetenzen, Über uns (Firma, Team, Zertifikate, Standorte), Referenzen, Karriere, Messen.
-
- // Construct our bottom nav items
+ // Scroll lock when flyout is open
+ React.useEffect(() => {
+ if (isFlyoutOpen) {
+ document.body.style.overflow = 'hidden';
+ } else {
+ document.body.style.overflow = '';
+ }
+ return () => {
+ document.body.style.overflow = '';
+ };
+ }, [isFlyoutOpen]);
+
const items = React.useMemo(() => {
const homeUrl = `/${currentLocale}`;
const competenciesUrl = navLinks[0]?.url || `/${currentLocale}/kompetenzen`;
@@ -37,44 +44,38 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
id: 'home',
label: currentLocale === 'de' ? 'Start' : 'Home',
url: homeUrl,
- icon: ,
+ icon: ,
exactMatch: true
},
{
id: 'kompetenzen',
label: navLinks[0]?.label || (currentLocale === 'de' ? 'Kompetenzen' : 'Competencies'),
url: competenciesUrl,
- icon:
+ icon:
},
{
id: 'referenzen',
label: navLinks[2]?.label || (currentLocale === 'de' ? 'Referenzen' : 'References'),
url: referencesUrl,
- icon: // Using Users for now, wait we need an image or star icon?
- },
- {
- id: 'menu',
- label: navLinks[1]?.label || (currentLocale === 'de' ? 'Über uns' : 'About Us'),
- url: '#', // Triggers flyout
- icon: ,
- isFlyoutTrigger: true
+ icon:
},
{
id: 'kontakt',
label: currentLocale === 'de' ? 'Kontakt' : 'Contact',
url: contactUrl,
- icon:
+ icon:
+ },
+ {
+ id: 'menu',
+ label: currentLocale === 'de' ? 'Mehr' : 'Menu',
+ url: '#',
+ icon:
,
+ isFlyoutTrigger: true
}
];
}, [currentLocale, navLinks]);
- // Use a star or folder for references? Let's use standard Briefcase for Kompetenzen, and maybe a Layers or Image icon for Referenzen.
- // We'll replace the Users icon with something better if possible, but Users is fine for now, wait, Users is Über uns!
- // I will fix the icon in the render.
-
- // Gather flyout links:
const flyoutLinks = React.useMemo(() => {
- // We want to put Über uns children, Karriere, and Messen in here.
const aboutNode = navLinks[1];
const karriereNode = navLinks[3];
const messenNode = navLinks[4];
@@ -90,10 +91,9 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
return (
<>
-