minor spacing stuff

This commit is contained in:
Carter 2025-02-13 10:49:37 -06:00
parent 2acdd59ac7
commit ef6e8de895
4 changed files with 32 additions and 37 deletions

View file

@ -33,7 +33,7 @@ export default function ComponentHistory(props: Props) {
offset: or(res.data.nextOffset, 0) offset: or(res.data.nextOffset, 0)
}); });
}) })
.catch((err: any) => { .catch((_err: any) => {
resolve({ resolve({
records: [] as Record[], records: [] as Record[],
total: 0, total: 0,

View file

@ -88,9 +88,6 @@ export default function DevicesSummary(props: Props) {
return ( return (
<Grid2 container spacing={1} marginBlock={1} > <Grid2 container spacing={1} marginBlock={1} >
<Grid2 size={{xs: 6, sm: 3}}> <Grid2 size={{xs: 6, sm: 3}}>
{loadingStats ?
<Skeleton className={classes.card} />
:
<Card <Card
className={ className={
classNames( classNames(
@ -119,7 +116,6 @@ export default function DevicesSummary(props: Props) {
</Grid2> </Grid2>
</Grid2> </Grid2>
</Card> </Card>
}
</Grid2> </Grid2>
<Grid2 size={{xs: 6, sm: 3}}> <Grid2 size={{xs: 6, sm: 3}}>
<Card <Card

View file

@ -1,7 +1,6 @@
import { import {
Box, Box,
Theme, Theme,
Toolbar
} from "@mui/material"; } from "@mui/material";
import SmartBreadcrumb from "common/SmartBreadcrumb"; import SmartBreadcrumb from "common/SmartBreadcrumb";
import { useDeviceAPI, useSnackbar } from "hooks"; import { useDeviceAPI, useSnackbar } from "hooks";

View file

@ -1,5 +1,5 @@
import { DeveloperBoard as ProvisionIcon, LibraryAdd as CreateGroupIcon } from "@mui/icons-material"; import { DeveloperBoard as ProvisionIcon, LibraryAdd as CreateGroupIcon } from "@mui/icons-material";
import { Box, Chip, CircularProgress, IconButton, Tab, Tabs, Theme, Tooltip, Typography } from "@mui/material"; import { Box, Chip, CircularProgress, IconButton, Skeleton, Tab, Tabs, Theme, Tooltip, Typography } from "@mui/material";
import { blue, green } from "@mui/material/colors"; import { blue, green } from "@mui/material/colors";
import { makeStyles } from "@mui/styles"; import { makeStyles } from "@mui/styles";
import ResponsiveTable, { Column } from "common/ResponsiveTable"; import ResponsiveTable, { Column } from "common/ResponsiveTable";
@ -354,7 +354,7 @@ export default function Devices() {
> >
<Tab wrapped value={"all"} label="All" /> <Tab wrapped value={"all"} label="All" />
{groupsLoading ? {groupsLoading ?
<Tab value={"loading"} label={<CircularProgress />}/> <Tab value={"loading"} label={<Skeleton variant="rectangular" height={24} width={128} animation="pulse" />}/>
: groups.map((group, index) => { : groups.map((group, index) => {
if (group.id()) return ( if (group.id()) return (
<Tab className={classes.tab} wrapped value={group.id().toString()} label={<Typography variant="inherit" noWrap>{group.name()}</Typography>} key={"group-tab-"+index}/> <Tab className={classes.tab} wrapped value={group.id().toString()} label={<Typography variant="inherit" noWrap>{group.name()}</Typography>} key={"group-tab-"+index}/>