import { Suspense } from "react"

import { getHeader, getName } from "@/lib/trpc/memoizedRequests"

import MainMenu from "./MainMenu"
import TopMenu, { TopMenuSkeleton } from "./TopMenu"

import styles from "./header.module.css"

export default async function Header() {
  void getName()
  void getHeader()

  return (
    <header className={styles.header}>
      <Suspense fallback={<TopMenuSkeleton />}>
        <TopMenu />
      </Suspense>
      <MainMenu />
    </header>
  )
}
