Extract incidents skeleton
This commit is contained in:
1 parent
edeea4497e
commit
ada89f9972
2 files changed
+32
-33
No files matched your search
@@ -1,43 +1,12 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import {
|
import { ButtonGroup, Stack, Typography, Button } from "@mui/material";
|
||||||
ButtonGroup,
|
|
||||||
Stack,
|
|
||||||
Skeleton,
|
|
||||||
Typography,
|
|
||||||
Button,
|
|
||||||
} from "@mui/material";
|
|
||||||
import { networkService } from "../../main";
|
import { networkService } from "../../main";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import Select from "../../Components/Inputs/Select";
|
import Select from "../../Components/Inputs/Select";
|
||||||
import IncidentTable from "./IncidentTable";
|
import IncidentTable from "./IncidentTable";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
import SkeletonLayout from "./skeleton";
|
||||||
/**
|
|
||||||
* Renders a skeleton layout.
|
|
||||||
*
|
|
||||||
* @returns {JSX.Element}
|
|
||||||
*/
|
|
||||||
const SkeletonLayout = () => {
|
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Stack direction="row" alignItems="center" gap={theme.spacing(6)}>
|
|
||||||
<Skeleton variant="rounded" width={150} height={34} />
|
|
||||||
<Skeleton variant="rounded" width="15%" height={34} />
|
|
||||||
<Skeleton
|
|
||||||
variant="rounded"
|
|
||||||
width="20%"
|
|
||||||
height={34}
|
|
||||||
sx={{ ml: "auto" }}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
<Skeleton variant="rounded" width="100%" height={300} />
|
|
||||||
<Skeleton variant="rounded" width="100%" height={100} />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const Incidents = () => {
|
const Incidents = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import { Stack, Skeleton } from "@mui/material";
|
||||||
|
import { useTheme } from "@emotion/react";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders a skeleton layout.
|
||||||
|
*
|
||||||
|
* @returns {JSX.Element}
|
||||||
|
*/
|
||||||
|
const SkeletonLayout = () => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Stack direction="row" alignItems="center" gap={theme.spacing(6)}>
|
||||||
|
<Skeleton variant="rounded" width={150} height={34} />
|
||||||
|
<Skeleton variant="rounded" width="15%" height={34} />
|
||||||
|
<Skeleton
|
||||||
|
variant="rounded"
|
||||||
|
width="20%"
|
||||||
|
height={34}
|
||||||
|
sx={{ ml: "auto" }}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
<Skeleton variant="rounded" width="100%" height={300} />
|
||||||
|
<Skeleton variant="rounded" width="100%" height={100} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SkeletonLayout;
|
||||||
Reference in new issue
Block a user