mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
lazy load mantineProvider for CSR
This commit is contained in:
parent
53c36fba23
commit
e9d8415d7f
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user