mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-08-19 22:09:08 +08:00
feat: adjust Suspense loading (#26)
This commit is contained in:
parent
07f965f0df
commit
4d16d826a2
@ -15,7 +15,14 @@ import { ThemeToggle } from "../../components/deer-flow/theme-toggle";
|
|||||||
import { Tooltip } from "../../components/deer-flow/tooltip";
|
import { Tooltip } from "../../components/deer-flow/tooltip";
|
||||||
import { SettingsDialog } from "../settings/dialogs/settings-dialog";
|
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() {
|
export default function HomePage() {
|
||||||
return (
|
return (
|
||||||
@ -39,9 +46,7 @@ export default function HomePage() {
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<Suspense fallback={<div>Loading DeerFlow...</div>}>
|
|
||||||
<Main />
|
<Main />
|
||||||
</Suspense>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user