This commit is contained in:
2026-07-10 13:27:29 +02:00
parent 5c48def4e1
commit 53bac4e2b4
35 changed files with 466 additions and 320 deletions

View File

@@ -10,8 +10,9 @@ export default function Navbar() {
const [scrolled, setScrolled] = useState(false)
const [menuOpen, setMenuOpen] = useState(false)
const pathname = usePathname()
const { t } = useLang()
const homeHref = (hash: string) => (pathname === '/' ? hash : `/${hash}`)
const { lang, t } = useLang()
const localeHome = lang === 'de' ? '/' : `/${lang}`
const homeHref = (hash: string) => (pathname === localeHome ? hash : `${localeHome}${hash}`)
useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 40)
@@ -22,7 +23,7 @@ export default function Navbar() {
return (
<nav className={`navbar${scrolled ? ' scrolled' : ''}`} id="navbar" role="navigation" aria-label="Main navigation">
<div className="container">
<Link href="/" className="nav-logo" aria-label="GreenLens Home">
<Link href={localeHome} className="nav-logo" aria-label="GreenLens Home">
GREENLENS
</Link>