'use client' import { useState } from 'react' import { useLocale, useTranslations } from 'next-intl' import { Link } from '@/i18n/navigation' import { wowheadWotlkHome } from '@/lib/wowhead' const SERVER_NAME = 'NightSpire' /** * Cabecera / barra de navegación — réplica EXACTA del partial Django * `home/templates/partials/header.html` con las clases del tema real * (nav-wrapper, nav-bar, nav-dropdown...). Los enlaces internos que ya * existen en web-next usan (next-intl); el resto se mantiene igual * que en Django. El toggle móvil replica el `nwNavBar()` que traía el JS del * tema (ns-scripts.js), borrado por muerto: la web no cargaba ningún JS del * tema. Está en el historial de git si hace falta consultarlo. */ export function SiteHeader({ loggedIn, accountLabel, realmName, realmHref, playersHref, }: { loggedIn: boolean accountLabel: string realmName: string realmHref: string playersHref: string }) { const locale = useLocale() const t = useTranslations('UI') const [open, setOpen] = useState(false) return (
setOpen((v) => !v)} >
{loggedIn ? ( {t('header.home')} ) : ( {t('header.register')} )}
{t('header.downloads')}

{t('header.client')}

{t('header.addons')}

{realmName.toUpperCase()}

{t('header.changelog')}

{t('header.realm')}

{loggedIn && (

{t('header.players')}

)}
{t('header.community')}

{t('header.forums')}

{t('header.wotlkDb')}

{t('header.videos')}

{loggedIn && (

{t('header.help')}

)}
{loggedIn ? (
{accountLabel}

{t('header.myAccount')}

{t('header.logout')}

) : ( {t('header.login')} )}
{/* eslint-disable @next/next/no-img-element */} {SERVER_NAME} NW {/* eslint-enable @next/next/no-img-element */}
) }