Add header to empty view
This commit is contained in:
1 parent
6c2298b976
commit
9515477fd7
1 file changed
+14
-3
@@ -78,11 +78,21 @@ const UptimeDetails = () => {
|
|||||||
setRowsPerPage(event.target.value);
|
setRowsPerPage(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Empty view, displayed when loading is complete and there are no checks
|
||||||
if (!monitorIsLoading && !checksAreLoading && checksCount === 0) {
|
if (!monitorIsLoading && !checksAreLoading && checksCount === 0) {
|
||||||
return (
|
return (
|
||||||
<GenericFallback>
|
<Stack gap={theme.spacing(10)}>
|
||||||
<Typography>There is no history for this monitor yet.</Typography>
|
<Breadcrumbs list={BREADCRUMBS} />
|
||||||
</GenericFallback>
|
<MonitorStatusHeader
|
||||||
|
path={"uptime"}
|
||||||
|
isAdmin={isAdmin}
|
||||||
|
shouldRender={!monitorIsLoading}
|
||||||
|
monitor={monitor}
|
||||||
|
/>
|
||||||
|
<GenericFallback>
|
||||||
|
<Typography>There is no history for this monitor yet.</Typography>
|
||||||
|
</GenericFallback>
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,6 +100,7 @@ const UptimeDetails = () => {
|
|||||||
<Stack gap={theme.spacing(10)}>
|
<Stack gap={theme.spacing(10)}>
|
||||||
<Breadcrumbs list={BREADCRUMBS} />
|
<Breadcrumbs list={BREADCRUMBS} />
|
||||||
<MonitorStatusHeader
|
<MonitorStatusHeader
|
||||||
|
path={"uptime"}
|
||||||
isAdmin={isAdmin}
|
isAdmin={isAdmin}
|
||||||
shouldRender={!monitorIsLoading}
|
shouldRender={!monitorIsLoading}
|
||||||
monitor={monitor}
|
monitor={monitor}
|
||||||
|
|||||||
Reference in new issue
Block a user