full upgrade
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
import React from "react";
|
||||
|
||||
// Dynamically import the heavy framer-motion component on the client only
|
||||
const BackgroundBlobs = dynamic(() => import("@/components/BackgroundBlobs"), { ssr: false });
|
||||
import React, { useEffect, useState } from "react";
|
||||
import BackgroundBlobs from "@/components/BackgroundBlobs";
|
||||
|
||||
export default function BackgroundBlobsClient() {
|
||||
// Avoid SSR/webpack bailout issues from `next/dynamic({ ssr:false })`
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true);
|
||||
}, []);
|
||||
|
||||
if (!mounted) return null;
|
||||
|
||||
return <BackgroundBlobs />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user