- improved statuses acress dashboard and child cards

This commit is contained in:
2025-12-03 16:05:06 +00:00
parent 9b35deaf12
commit 173b1d0e51
5 changed files with 33 additions and 10 deletions

View File

@@ -13,12 +13,21 @@ const SystemStatusCard = () => {
const { storeQuery } = useGetStore();
const reads = storeQuery?.data;
const isReadsLoading = storeQuery.isFetching;
const isReadsLoading = storeQuery?.isFetching;
const isError = storeQuery?.isError || !storeQuery?.data;
useEffect(() => {
storeQuery.refetch();
}, [reads]);
if (isError) {
return (
<Card className="p-4">
<CardHeader title="System Status" />
<span className="text-red-500">Error loading system status.</span>
</Card>
);
}
return (
<Card className="p-4">
<CardHeader title="System Status" />