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