lazy load mantineProvider for CSR

This commit is contained in:
AykutSarac 2024-08-13 00:41:47 +03:00
parent 53c36fba23
commit e9d8415d7f
No known key found for this signature in database

View File

@ -3,7 +3,7 @@ import type { AppProps } from "next/app";
import dynamic from "next/dynamic";
import Head from "next/head";
import { useRouter } from "next/router";
import { MantineProvider, createTheme } from "@mantine/core";
import { createTheme } from "@mantine/core";
import "@mantine/core/styles.css";
import "@mantine/code-highlight/styles.css";
import { ThemeProvider } from "styled-components";
@ -14,6 +14,10 @@ import { Loading } from "src/layout/Loading";
import { supabase } from "src/lib/api/supabase";
import useUser from "src/store/useUser";
const MantineProvider = dynamic(() => import("@mantine/core").then(c => c.MantineProvider), {
ssr: false,
});
const theme = createTheme({
autoContrast: true,
fontSmoothing: false,