fix: content does not render elements during loading
This commit is contained in:
@@ -90,10 +90,11 @@ export function SettingProvider({ children, isSettingPage }) {
|
||||
);
|
||||
|
||||
if (isLoading) {
|
||||
return <Loading />;
|
||||
return isSettingPage ? <Loading /> : null;
|
||||
}
|
||||
|
||||
if (!setting) {
|
||||
return isSettingPage ? (
|
||||
<center>
|
||||
<Alert severity="error" sx={{ maxWidth: 600, margin: "60px auto" }}>
|
||||
<p>数据加载出错,请刷新页面或卸载后重新安装。</p>
|
||||
@@ -102,7 +103,8 @@ export function SettingProvider({ children, isSettingPage }) {
|
||||
reinstall.
|
||||
</p>
|
||||
</Alert>
|
||||
</center>;
|
||||
</center>
|
||||
) : null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user