fix: address mobile dashboard review findings
This commit is contained in:
1 parent
fa3d0375c5
commit
1039bb18b3
21 files changed
+175
-45
No files matched your search
@@ -47,6 +47,8 @@ function BeszelSystemStatsContent({
|
||||
data: systemsResult = [],
|
||||
isPending: systemsPending,
|
||||
error: systemsError,
|
||||
isLoadingError: systemsLoadingError,
|
||||
isRefetchError: systemsRefetchError,
|
||||
} = clientApi.widget.beszel.getSystems.useQuery({ integrationIds });
|
||||
|
||||
const systems = useMemo(
|
||||
@@ -78,7 +80,7 @@ function BeszelSystemStatsContent({
|
||||
[setOptions, isReadOnly, hasChangeAccess, boardId, itemId, saveItemOptions],
|
||||
);
|
||||
|
||||
if (systemsError) throw systemsError;
|
||||
if (systemsLoadingError) throw systemsError;
|
||||
if (systemsPending)
|
||||
return (
|
||||
<Center h="100%">
|
||||
@@ -89,7 +91,7 @@ function BeszelSystemStatsContent({
|
||||
if (systems.length === 0) {
|
||||
return (
|
||||
<Box h="100%" pos="relative">
|
||||
<BeszelIntegrationErrorIndicator results={systemsResult} />
|
||||
<BeszelIntegrationErrorIndicator results={systemsResult} isStale={systemsRefetchError} />
|
||||
<Center h="100%">
|
||||
<Stack align="center" gap="xs">
|
||||
<IconServerOff size={28} opacity={0.5} />
|
||||
@@ -125,7 +127,7 @@ function BeszelSystemStatsContent({
|
||||
return (
|
||||
<Box h="100%" pos="relative">
|
||||
<Box pos="absolute" top={4} right={8} style={{ zIndex: 1 }}>
|
||||
<BeszelIntegrationErrorIndicator results={systemsResult} />
|
||||
<BeszelIntegrationErrorIndicator results={systemsResult} isStale={systemsRefetchError} />
|
||||
</Box>
|
||||
<ScrollArea
|
||||
h="100%"
|
||||
|
||||
Reference in new issue
Block a user