- improved statuses acress dashboard and child cards
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user