fix: content does not render elements during loading

This commit is contained in:
Gabe
2025-11-20 16:33:49 +08:00
parent 7e99bc7aad
commit 1504830142

View File

@@ -90,19 +90,21 @@ export function SettingProvider({ children, isSettingPage }) {
);
if (isLoading) {
return <Loading />;
return isSettingPage ? <Loading /> : null;
}
if (!setting) {
<center>
<Alert severity="error" sx={{ maxWidth: 600, margin: "60px auto" }}>
<p>数据加载出错请刷新页面或卸载后重新安装</p>
<p>
Data loading error, please refresh the page or uninstall and
reinstall.
</p>
</Alert>
</center>;
return isSettingPage ? (
<center>
<Alert severity="error" sx={{ maxWidth: 600, margin: "60px auto" }}>
<p>数据加载出错请刷新页面或卸载后重新安装</p>
<p>
Data loading error, please refresh the page or uninstall and
reinstall.
</p>
</Alert>
</center>
) : null;
}
return (