Newer
Older
taehui / qwilight-fe / src / app / [language] / layout.tsx
@Taehui Taehui on 6 Apr 919 bytes 2024-04-07 오전 8:25
import QwilightView from "@/components/QwilightView";
import { Stores } from "@/state/Stores";
import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
import { ReactNode } from "react";

import "react-contexify/dist/ReactContexify.css";
import "react-toastify/dist/ReactToastify.css";
import "@/app/globals.scss";

export default async function Layout({
  children,
  params: { language },
}: {
  children: ReactNode;
  params: { language: string };
}) {
  return (
    <html lang={language} data-bs-theme="dark">
      <head>
        <title>Qwilight</title>
      </head>
      <body>
        <NextIntlClientProvider
          locale={language}
          messages={await getMessages({ locale: language })}
        >
          <Stores>
            <QwilightView>{children}</QwilightView>
          </Stores>
        </NextIntlClientProvider>
      </body>
    </html>
  );
}