Skip to content

Commit 1481bc8

Browse files
committed
feat: lazy-load Codeblock component
1 parent ad55d13 commit 1481bc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pages/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import type { CommunityEventsReturnType } from "@/lib/interfaces"
2525
import ActionCard from "@/components/ActionCard"
2626
import ButtonLink from "@/components/Buttons/ButtonLink"
2727
import CalloutBanner from "@/components/CalloutBanner"
28-
import Codeblock from "@/components/Codeblock"
2928
import CommunityEvents from "@/components/CommunityEvents"
3029
import HomeHero from "@/components/Hero/HomeHero"
3130
import { Image } from "@/components/Image"
@@ -332,7 +331,10 @@ const HomePage = ({
332331

333332
const cardBoxShadow = useToken("colors", "cardBoxShadow")
334333

335-
// Lazy-load CodeModal component
334+
// Lazy-load these components on initial load
335+
const Codeblock = dynamic(() => import("@/components/Codeblock"), {
336+
ssr: false,
337+
})
336338
const CodeModal = dynamic(() => import("@/components/CodeModal"), {
337339
ssr: false,
338340
})

0 commit comments

Comments
 (0)