import { Suspense } from "react"

import SitewideAlert, { preload } from "@/components/SitewideAlert"
import { setLang } from "@/i18n/serverContext"

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

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

  return (
    <Suspense>
      <SitewideAlert />
    </Suspense>
  )
}
