Skip to content

Commit a8cf83a

Browse files
committed
feat: lazy load FeedbackWidget
1 parent 4d8fc25 commit a8cf83a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/layouts/RootLayout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { join } from "path"
22

3+
import dynamic from "next/dynamic"
34
import { useRouter } from "next/router"
45
import { Container } from "@chakra-ui/react"
56

67
import type { Root } from "@/lib/types"
78

8-
import FeedbackWidget from "@/components/FeedbackWidget"
99
import Footer from "@/components/Footer"
1010
import Nav from "@/components/Nav"
1111
import { SkipLink } from "@/components/SkipLink"
@@ -46,6 +46,10 @@ export const RootLayout = ({
4646
const shouldShowLegalTranslationBanner = isLegal && !isPageLanguageEnglish
4747
const originalPagePath = toPosixPath(join(DEFAULT_LOCALE, asPath))
4848

49+
const FeedbackWidget = dynamic(() => import("@/components/FeedbackWidget"), {
50+
ssr: false,
51+
})
52+
4953
return (
5054
<Container mx="auto" maxW={oldTheme.variables.maxPageWidth}>
5155
<SkipLink />

0 commit comments

Comments
 (0)