Refactor TaskQueuePage to use lazy loading and suspense
This commit is contained in:
parent
f543ad1cf4
commit
1e3701e37c
1 changed files with 8 additions and 4 deletions
|
@ -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>
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Add table
Reference in a new issue