This commit is contained in:
louiscklaw
2025-04-22 01:07:18 +08:00
parent e4aee3f02f
commit 7f3f02463f
33 changed files with 62 additions and 2283 deletions

View File

@@ -29,7 +29,7 @@ function ActiveUserCount(): React.JSX.Element {
const tempCount = await getAllUserMetasCount();
setAmount(tempCount);
} catch (error) {
setAmount(-9);
setAmount(-99);
setErrorDetail(JSON.stringify(error));
setShowError(true);
} finally {
@@ -40,7 +40,14 @@ function ActiveUserCount(): React.JSX.Element {
}, []);
if (showLoading) {
return <LoadingSummary diff={10} icon={UsersIcon} title={t('用戶數量')} trend="up" />;
return (
<LoadingSummary
diff={10}
icon={UsersIcon}
title={t('用戶數量')}
trend="up"
/>
);
}
if (showError) return <div>{errorDetail}</div>;