Skip to content

Commit f8e7e26

Browse files
author
Carla Goncalves
committed
Update codesplit issues
1 parent 578e32f commit f8e7e26

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

apps/site/src/app/(index)/page.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import dynamic from "next/dynamic";
2-
const Antigravity = dynamic(
3-
() => import("../../components/homepage/antigravity"),
4-
{ ssr: false },
5-
);
1+
import Antigravity from "../../components/homepage/antigravity-client";
62
import type { Metadata } from "next";
73
import { SITE_HOME_DESCRIPTION, SITE_HOME_TITLE } from "@/lib/site-metadata";
84
import { Button } from "@prisma/eclipse";
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use client";
2+
3+
import dynamic from "next/dynamic";
4+
5+
// Lazy-load the particle animation component client-side only.
6+
// next/dynamic with ssr:false cannot be called from a Server Component — it
7+
// must live in a "use client" module. This thin wrapper follows the same
8+
// pattern used by masonry-client.tsx.
9+
const Antigravity = dynamic(() => import("./antigravity"), { ssr: false });
10+
11+
export default Antigravity;

0 commit comments

Comments
 (0)