import { Suspense } from "react"

import Breadcrumbs from "@/components/Breadcrumbs"
import BreadcrumbsSkeleton from "@/components/Breadcrumbs/BreadcrumbsSkeleton"
import { setLang } from "@/i18n/serverContext"

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

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

  return (
    <Suspense fallback={<BreadcrumbsSkeleton />}>
      <Breadcrumbs />
    </Suspense>
  )
}
