Refactor TaskQueuePage to use lazy loading and suspense
This commit is contained in:
parent
f543ad1cf4
commit
1e3701e37c
@ -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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<Suspense fallback={<div>Loading...</div>}>
|
||||||
<DynamicWorkQueue />
|
<DynamicWorkQueue />
|
||||||
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user