-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1188 from bluewave-labs/feat/fe/details-empty-views
add safety checks and simple empty view for details page, addresses #1187
- Loading branch information
Showing
2 changed files
with
85 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { useTheme } from "@emotion/react"; | ||
import PlaceholderLight from "../../../assets/Images/data_placeholder.svg?react"; | ||
import PlaceholderDark from "../../../assets/Images/data_placeholder_dark.svg?react"; | ||
import { Box, Typography, Stack } from "@mui/material"; | ||
import PropTypes from "prop-types"; | ||
import { useSelector } from "react-redux"; | ||
const Empty = ({ styles }) => { | ||
const theme = useTheme(); | ||
const mode = useSelector((state) => state.ui.mode); | ||
return ( | ||
<Box sx={{ ...styles, marginTop: theme.spacing(24) }}> | ||
<Stack | ||
direction="column" | ||
gap={theme.spacing(8)} | ||
alignItems="center" | ||
> | ||
{mode === "light" ? <PlaceholderLight /> : <PlaceholderDark />} | ||
|
||
<Typography variant="h2">Your infrastructure dashboard will show here</Typography> | ||
<Typography | ||
textAlign="center" | ||
color={theme.palette.text.secondary} | ||
> | ||
Hang tight! When we receive data, we'll show it here. Please check back in a few | ||
minutes. | ||
</Typography> | ||
</Stack> | ||
</Box> | ||
); | ||
}; | ||
|
||
Empty.propTypes = { | ||
styles: PropTypes.object, | ||
mode: PropTypes.string, | ||
}; | ||
|
||
export default Empty; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters