import { Suspense } from "react"

import { env } from "@/env/server"

import CurrentHeader from "@/components/Current/Header"
import HeaderFallback from "@/components/Current/Header/HeaderFallback"
import Header from "@/components/Header"

import type { LangParams, PageArgs } from "@/types/params"

export default function HeaderPage({}: PageArgs<LangParams>) {
  if (env.HIDE_FOR_NEXT_RELEASE) {
    return (
      <Suspense fallback={<HeaderFallback />}>
        <CurrentHeader />
      </Suspense>
    )
  }

  return <Header />
}
