️ improve: web improve

This commit is contained in:
Martial BE 2024-04-02 11:24:03 +08:00
parent c7387dd5b1
commit 6b018b405a
No known key found for this signature in database
GPG Key ID: D06C32DF0EDB9084
2 changed files with 7 additions and 7 deletions

View File

@ -32,13 +32,13 @@ export default function Overview() {
data.total_used_quota = renderQuota(data.total_used_quota); data.total_used_quota = renderQuota(data.total_used_quota);
data.total_direct_user = data.total_user - data.total_inviter_user; data.total_direct_user = data.total_user - data.total_inviter_user;
setUserStatistics(data); setUserStatistics(data);
setUserLoading(false);
} else { } else {
showError(message); showError(message);
} }
} catch (error) { } catch (error) {
return; console.log(error);
} }
setUserLoading(false);
}, []); }, []);
const channelStatisticsData = useCallback(async () => { const channelStatisticsData = useCallback(async () => {
@ -59,13 +59,13 @@ export default function Overview() {
channelData.total += item.total_channels; channelData.total += item.total_channels;
}); });
setChannelStatistics(channelData); setChannelStatistics(channelData);
setChannelLoading(false);
} else { } else {
showError(message); showError(message);
} }
} catch (error) { } catch (error) {
return; console.log(error);
} }
setChannelLoading(false);
}, [channelStatistics]); }, [channelStatistics]);
const redemptionStatisticsData = useCallback(async () => { const redemptionStatisticsData = useCallback(async () => {
@ -85,13 +85,13 @@ export default function Overview() {
}); });
redemptionData.total = renderQuota(redemptionData.total); redemptionData.total = renderQuota(redemptionData.total);
setRedemptionStatistics(redemptionData); setRedemptionStatistics(redemptionData);
setRedemptionLoading(false);
} else { } else {
showError(message); showError(message);
} }
} catch (error) { } catch (error) {
return; console.log(error);
} }
setRedemptionLoading(false);
}, [redemptionStatistics]); }, [redemptionStatistics]);
useEffect(() => { useEffect(() => {

View File

@ -67,7 +67,7 @@ const Dashboard = () => {
<Grid item lg={4} xs={12}> <Grid item lg={4} xs={12}>
<StatisticalLineChartCard <StatisticalLineChartCard
isLoading={isLoading} isLoading={isLoading}
title="今日请求" title="今日请求"
chartData={requestChart?.chartData} chartData={requestChart?.chartData}
todayValue={requestChart?.todayValue} todayValue={requestChart?.todayValue}
/> />