first commit
This commit is contained in:
@@ -1,21 +1,15 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
"use client";
|
||||
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
import { CacheProvider } from "@emotion/react";
|
||||
import { ThemeProvider } from "@mui/material/styles";
|
||||
import rtlCache from "./theme/rtlCache";
|
||||
import theme from "./theme/theme";
|
||||
import { CssBaseline } from "@mui/material";
|
||||
import { FontVazir } from "@/config/font.config";
|
||||
import { ToastContainer } from "react-toastify";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
import ReactQueryProvider from "@/ui/ReactQueryProvider";
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
@@ -24,10 +18,29 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
lang="fa"
|
||||
dir="rtl"
|
||||
className={`${FontVazir.variable} h-full antialiased`}
|
||||
style={{ fontFamily: FontVazir.style.fontFamily }}
|
||||
>
|
||||
<body className="min-h-full flex flex-col">{children}</body>
|
||||
<body className="min-h-screen flex items-center justify-center">
|
||||
<ReactQueryProvider>
|
||||
<CacheProvider value={rtlCache}>
|
||||
<ThemeProvider theme={theme}>
|
||||
<CssBaseline />
|
||||
<main className="w-full">
|
||||
<div className=" mx-auto px-35">{children}</div>
|
||||
</main>
|
||||
<ToastContainer
|
||||
position="top-center"
|
||||
autoClose={3000}
|
||||
rtl
|
||||
theme="colored"
|
||||
/>
|
||||
</ThemeProvider>
|
||||
</CacheProvider>
|
||||
</ReactQueryProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user