Refactor AIPage and EQPage components to use lazy loading with PageSuspense for improved performance; update vite.config.ts to adjust chunking strategy and increase chunk size warning limit for better handling of large libraries.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Suspense, type ReactNode } from "react";
|
||||
|
||||
function PageFallback() {
|
||||
return (
|
||||
<div className="flex min-h-dvh items-center justify-center bg-[#0d1117]">
|
||||
<span className="text-sm text-white/40">Loading…</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function PageSuspense({ children }: { children: ReactNode }) {
|
||||
return <Suspense fallback={<PageFallback />}>{children}</Suspense>;
|
||||
}
|
||||
Reference in New Issue
Block a user