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

import CurrentHeader from "@/components/Current/Header"
import Header from "@/components/Header"
import { setLang } from "@/i18n/serverContext"

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

export default function HeaderPage({ params }: PageArgs<LangParams>) {
  setLang(params.lang)

  if (env.HIDE_FOR_NEXT_RELEASE) {
    return <CurrentHeader />
  }

  return <Header />
}
