From 1e3701e37c2083026d8eb97a93b71e9a89d5da72 Mon Sep 17 00:00:00 2001 From: monoid Date: Sun, 13 Oct 2024 02:08:12 +0900 Subject: [PATCH] Refactor TaskQueuePage to use lazy loading and suspense --- packages/client/src/page/taskQueuePage.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/client/src/page/taskQueuePage.tsx b/packages/client/src/page/taskQueuePage.tsx index 9e8de0b..da6add8 100644 --- a/packages/client/src/page/taskQueuePage.tsx +++ b/packages/client/src/page/taskQueuePage.tsx @@ -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 (
- + Loading...
}> + + - ) + ); } \ No newline at end of file