import { getSession } from '@/lib/session'
import { SiteHeader } from './SiteHeader'

export async function Header() {
  const session = await getSession()
  const loggedIn = Boolean(session.username)
  // Django muestra bnet_email si existe, si no el username.
  const accountLabel = session.bnetEmail || session.username || ''

  return <SiteHeader loggedIn={loggedIn} accountLabel={accountLabel} />
}
