"use client";
import { Suspense, lazy, useState, useEffect } from "react";
const Pixi = lazy(() => import("@/components/shared/pixi/Pixi"));
import features from "./tickers/features";
function PixiContent() {
return (
);
}
export default function HomeHeroPixi() {
const [hasError, setHasError] = useState(false);
useEffect(() => {
const handleError = (e: ErrorEvent) => {
if (e.message.includes('pixi') || e.message.includes('ChunkLoadError')) {
setHasError(true);
}
};
window.addEventListener('error', handleError);
return () => window.removeEventListener('error', handleError);
}, []);
if (hasError) {
// Return empty div as fallback if Pixi fails to load
return
;
}
return (
}>
);
}