Refactor TaskQueuePage to use lazy loading and suspense

This commit is contained in:
monoid 2024-10-13 02:08:12 +09:00
parent f543ad1cf4
commit 1e3701e37c

View File

@ -1,9 +1,13 @@
import DynamicWorkQueue from "@/components/gallery/WorkQueue"; import { lazy, Suspense } from 'react';
const DynamicWorkQueue = lazy(() => import('@/components/gallery/WorkQueue'));
export default function TaskQueuePage() { export default function TaskQueuePage() {
return ( return (
<div> <div>
<Suspense fallback={<div>Loading...</div>}>
<DynamicWorkQueue /> <DynamicWorkQueue />
</Suspense>
</div> </div>
) );
} }