import { Link, NavLink } from 'react-router-dom' import MoonDot from './MoonDot.jsx' import { useAuth } from '../contexts/AuthContext.jsx' // One consistent top nav for the whole public site. Every page gets the same // main links plus an auth-aware entry on the right (Sign in / My Account / Admin). const NAV = [ { label: 'Home', to: '/', end: true }, { label: 'News', to: '/site/news' }, { label: 'Screenshots', to: '/site/screenshots' }, { label: 'Five on Friday', to: '/site/five-on-friday' }, { label: 'Newsletter', to: '/site/newsletter' }, { label: 'Wiki', to: '/wiki' }, { label: 'Shard', to: '/site/shard' }, { label: 'About', to: '/site/about' }, ] const linkStyle = ({ isActive }) => ({ background: isActive ? 'var(--accent)' : undefined, color: isActive ? 'var(--bg-deep)' : undefined, borderColor: isActive ? 'var(--accent)' : undefined, }) export default function SiteHeader() { const { user, loading } = useAuth() // Where the auth entry points: staff → admin, player → portal, else sign in. const account = user && user.role && user.role !== 'player' ? { label: 'Admin', to: '/admin' } : user ? { label: 'My Account', to: '/player' } : { label: 'Sign in', to: '/account/login' } return (
UOMysticmoon
) }