diff --git a/frontend/src/components/navbar.tsx b/frontend/src/components/navbar.tsx index 67a4318..dbe644d 100644 --- a/frontend/src/components/navbar.tsx +++ b/frontend/src/components/navbar.tsx @@ -1,6 +1,6 @@ "use client" -import { useState } from "react" +import { useState, useEffect } from "react" import Link from "next/link" import Image from "next/image" import { Button } from "@/components/ui/button" @@ -11,119 +11,130 @@ import { useTranslation } from "@/lib/i18n" import { LanguageSwitcher } from "@/components/language-switcher" export function Navbar() { - const [isOpen, setIsOpen] = useState(false) - const user = getCurrentUser() - const { t } = useTranslation() + const [isOpen, setIsOpen] = useState(false) + const [mounted, setMounted] = useState(false) + const user = getCurrentUser() + const { t } = useTranslation() - const navigationItems = [ - { href: "/jobs", label: t('nav.jobs') }, - { href: "/companies", label: t('footer.empresas') }, - { href: "/blog", label: t('footer.blog') }, - ] + // Prevent hydration mismatch by only rendering translated content after mount + useEffect(() => { + setMounted(true) + }, []) - return ( - - ) + + + ) }