import { getLang, setLang } from "@/i18n/serverContext"

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

import { LangParams, LayoutArgs, StatusParams } from "@/types/params"

export default function MiddlewareError({
  params,
}: LayoutArgs<LangParams & StatusParams>) {
  setLang(params.lang)

  return (
    <div className={styles.layout}>
      Middleware Error {getLang()}: {params.status}
    </div>
  )
}
