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';
export default function TaskQueuePage(){
const DynamicWorkQueue = lazy(() => import('@/components/gallery/WorkQueue'));
export default function TaskQueuePage() {
return (
<div>
<DynamicWorkQueue />
<Suspense fallback={<div>Loading...</div>}>
<DynamicWorkQueue />
</Suspense>
</div>
)
);
}