mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: remove loading fallback in Suspense and use spin to display (#2780)
This commit is contained in:
parent
d988ac814c
commit
89df80baca
@ -18,7 +18,7 @@ import {Helmet} from "react-helmet";
|
||||
import * as Setting from "./Setting";
|
||||
import {StyleProvider, legacyLogicalPropertiesTransformer} from "@ant-design/cssinjs";
|
||||
import {GithubOutlined, InfoCircleFilled, ShareAltOutlined} from "@ant-design/icons";
|
||||
import {Alert, Button, ConfigProvider, Drawer, FloatButton, Layout, Result, Tooltip} from "antd";
|
||||
import {Alert, Button, ConfigProvider, Drawer, FloatButton, Layout, Result, Spin, Tooltip} from "antd";
|
||||
import {Route, Switch, withRouter} from "react-router-dom";
|
||||
import CustomGithubCorner from "./common/CustomGithubCorner";
|
||||
import * as Conf from "./Conf";
|
||||
@ -366,7 +366,10 @@ class App extends Component {
|
||||
<FloatButton.BackTop />
|
||||
<CustomGithubCorner />
|
||||
{
|
||||
<Suspense fallback={<div>loading</div>}>
|
||||
<Suspense fallback={
|
||||
<div className="loginBackground" style={{height: "100vh"}}>
|
||||
<Spin size="large" spinning={true} tip={i18next.t("login:Loading")} style={{margin: "0 auto"}} />
|
||||
</div>}>
|
||||
<Layout id="parent-area">
|
||||
<ManagementPage
|
||||
account={this.state.account}
|
||||
|
Loading…
x
Reference in New Issue
Block a user