wrap in suspense boundary to fix build issue
This commit is contained in:
@ -1,21 +1,21 @@
|
|||||||
|
|
||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import { IBM_Plex_Sans, IBM_Plex_Mono } from 'next/font/google';
|
import { IBM_Plex_Sans, IBM_Plex_Mono } from "next/font/google";
|
||||||
import { Provider } from "@/components/ui/provider";
|
import { Provider } from "@/components/ui/provider";
|
||||||
import { Flex } from "@chakra-ui/react";
|
import { Flex } from "@chakra-ui/react";
|
||||||
import { Toaster } from "@/components/ui/toaster";
|
import { Toaster } from "@/components/ui/toaster";
|
||||||
|
import { Suspense } from "react";
|
||||||
|
|
||||||
const ibmPlexSans = IBM_Plex_Sans({
|
const ibmPlexSans = IBM_Plex_Sans({
|
||||||
subsets: ['latin'],
|
subsets: ["latin"],
|
||||||
variable: '--font-ibm'
|
variable: "--font-ibm",
|
||||||
});
|
});
|
||||||
|
|
||||||
const ibmPlexMono = IBM_Plex_Mono({
|
const ibmPlexMono = IBM_Plex_Mono({
|
||||||
subsets: ['latin'],
|
subsets: ["latin"],
|
||||||
weight: '600',
|
weight: "600",
|
||||||
variable: '--font-ibm-mono'
|
variable: "--font-ibm-mono",
|
||||||
})
|
});
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "LMGCITFY",
|
title: "LMGCITFY",
|
||||||
@ -31,9 +31,18 @@ export default function RootLayout({
|
|||||||
<html lang="en" suppressHydrationWarning={true}>
|
<html lang="en" suppressHydrationWarning={true}>
|
||||||
<body className={`${ibmPlexSans.variable} ${ibmPlexMono.variable}`}>
|
<body className={`${ibmPlexSans.variable} ${ibmPlexMono.variable}`}>
|
||||||
<Provider>
|
<Provider>
|
||||||
<Flex backgroundImage={'url(/background.gif)'} backgroundRepeat={'repeat'} minH={'100vh'} minW={'full'} justify={'center'} align={'center'}>
|
<Suspense>
|
||||||
{children}
|
<Flex
|
||||||
</Flex>
|
backgroundImage={"url(/background.gif)"}
|
||||||
|
backgroundRepeat={"repeat"}
|
||||||
|
minH={"100vh"}
|
||||||
|
minW={"full"}
|
||||||
|
justify={"center"}
|
||||||
|
align={"center"}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Flex>
|
||||||
|
</Suspense>
|
||||||
<Toaster />
|
<Toaster />
|
||||||
</Provider>
|
</Provider>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
Box,
|
Box,
|
||||||
Separator,
|
Separator,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { useEffect, useState, useRef } from "react";
|
import { useEffect, useState, useRef, Suspense } from "react";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import { toaster } from "@/components/ui/toaster";
|
import { toaster } from "@/components/ui/toaster";
|
||||||
import { getRandomResultFromGCI, lmgcitfy } from "@/actions";
|
import { getRandomResultFromGCI, lmgcitfy } from "@/actions";
|
||||||
|
|||||||
Reference in New Issue
Block a user