import { NextIntlClientProvider } from "next-intl"
import { getMessages } from "next-intl/server"

import { Layout } from "@/components/layout"

export default async function DashboardLayout({
  children,
}: {
  children: React.ReactNode
}) {
  const messages = await getMessages()

  return (
    <NextIntlClientProvider messages={messages}>
      <Layout>{children}</Layout>
    </NextIntlClientProvider>
  )
}
