feat: adjust Suspense loading (#26)

This commit is contained in:
Leo Hui 2025-05-12 14:33:13 +08:00 committed by GitHub
parent 07f965f0df
commit 4d16d826a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,14 @@ import { ThemeToggle } from "../../components/deer-flow/theme-toggle";
import { Tooltip } from "../../components/deer-flow/tooltip";
import { SettingsDialog } from "../settings/dialogs/settings-dialog";
const Main = dynamic(() => import("./main"), { ssr: false });
const Main = dynamic(() => import("./main"), {
ssr: false,
loading: () => (
<div className="flex h-full w-full items-center justify-center">
Loading DeerFlow...
</div>
),
});
export default function HomePage() {
return (
@ -39,9 +46,7 @@ export default function HomePage() {
</Suspense>
</div>
</header>
<Suspense fallback={<div>Loading DeerFlow...</div>}>
<Main />
</Suspense>
</div>
);
}