Prevent white screen: wrap ActivityFeed in error boundary and improve ClientProviders error handling
All checks were successful
Dev Deployment (Zero Downtime) / deploy-dev (push) Successful in 13m10s
Production Deployment (Zero Downtime) / deploy-production (push) Successful in 11m4s

This commit is contained in:
2026-01-10 17:08:16 +01:00
parent 832b468ea7
commit 9cc03bc475
2 changed files with 41 additions and 13 deletions

View File

@@ -7,9 +7,16 @@ import Projects from "./components/Projects";
import Contact from "./components/Contact";
import Footer from "./components/Footer";
import Script from "next/script";
import ActivityFeed from "./components/ActivityFeed";
import dynamic from "next/dynamic";
import ErrorBoundary from "@/components/ErrorBoundary";
import { motion } from "framer-motion";
// Wrap ActivityFeed in error boundary to prevent crashes
const ActivityFeed = dynamic(() => import("./components/ActivityFeed").catch(() => ({ default: () => null })), {
ssr: false,
loading: () => null,
});
export default function Home() {
return (
<div className="min-h-screen">
@@ -35,7 +42,9 @@ export default function Home() {
}),
}}
/>
<ActivityFeed />
<ErrorBoundary>
<ActivityFeed />
</ErrorBoundary>
<Header />
{/* Spacer to prevent navbar overlap */}
<div className="h-24 md:h-32" aria-hidden="true"></div>