fallback and histogram

This commit is contained in:
Alex Holliday committed 2026-02-28 22:03:30 +00:00
1 parent 9174e66134
commit 9169410c1a
2 files changed
+14 -12

No files matched your search

@@ -2,6 +2,7 @@ import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { BulletPointCheck, SkeletonCard } from "@/Components/design-elements"; import { BulletPointCheck, SkeletonCard } from "@/Components/design-elements";
import { Button } from "@/Components/inputs"; import { Button } from "@/Components/inputs";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import { useNavigate } from "react-router"; import { useNavigate } from "react-router";
import useMediaQuery from "@mui/material/useMediaQuery"; import useMediaQuery from "@mui/material/useMediaQuery";
@@ -27,7 +28,7 @@ export const BaseFallback = ({ children, ...props }: BaseFallbackProps) => {
lg: "50%", lg: "50%",
xl: "40%", xl: "40%",
}} }}
padding={{ xs: theme.spacing(8), md: theme.spacing(16) }} padding={{ xs: theme.spacing(LAYOUT.MD), md: theme.spacing(LAYOUT.XXL) }}
bgcolor={theme.palette.background.paper} bgcolor={theme.palette.background.paper}
border={1} border={1}
borderColor={theme.palette.divider} borderColor={theme.palette.divider}
@@ -55,7 +56,7 @@ export const ErrorFallback = ({
<BaseFallback> <BaseFallback>
<Typography <Typography
variant="h1" variant="h1"
marginY={theme.spacing(4)} marginY={theme.spacing(LAYOUT.XS)}
color={theme.palette.text.secondary} color={theme.palette.text.secondary}
> >
{title} {title}
@@ -81,7 +82,7 @@ export const EmptyFallback = ({
return ( return (
<BaseFallback> <BaseFallback>
<Stack <Stack
gap={theme.spacing(10)} gap={theme.spacing(LAYOUT.MD)}
zIndex={1} zIndex={1}
alignItems="center" alignItems="center"
> >
@@ -89,7 +90,7 @@ export const EmptyFallback = ({
<Stack <Stack
sx={{ sx={{
flexWrap: "wrap", flexWrap: "wrap",
gap: theme.spacing(2), gap: theme.spacing(SPACING.MD),
maxWidth: "1100px", maxWidth: "1100px",
width: "100%", width: "100%",
}} }}
@@ -134,7 +135,7 @@ export const EmptyMonitorFallback = ({
return ( return (
<BaseFallback> <BaseFallback>
<Stack <Stack
gap={theme.spacing(10)} gap={theme.spacing(LAYOUT.MD)}
zIndex={1} zIndex={1}
alignItems="center" alignItems="center"
> >
@@ -147,7 +148,7 @@ export const EmptyMonitorFallback = ({
<Stack <Stack
sx={{ sx={{
flexWrap: "wrap", flexWrap: "wrap",
gap: theme.spacing(2), gap: theme.spacing(SPACING.MD),
maxWidth: "1100px", maxWidth: "1100px",
width: "100%", width: "100%",
}} }}
@@ -2,6 +2,7 @@ import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import { SPACING, LAYOUT } from "@/Utils/Theme/constants";
import { formatDateWithTz } from "@/Utils/TimeUtils"; import { formatDateWithTz } from "@/Utils/TimeUtils";
import type { ConfigItem } from "@/Components/monitors"; import type { ConfigItem } from "@/Components/monitors";
import type { TooltipProps } from "recharts"; import type { TooltipProps } from "recharts";
@@ -30,8 +31,8 @@ export const HistogramPageSpeedScoresTooltip = ({
border: 1, border: 1,
borderColor: theme.palette.divider, borderColor: theme.palette.divider,
borderRadius: theme.shape.borderRadius, borderRadius: theme.shape.borderRadius,
py: theme.spacing(2), py: theme.spacing(SPACING.LG),
px: theme.spacing(4), px: theme.spacing(LAYOUT.XS),
}} }}
> >
<Typography <Typography
@@ -54,12 +55,12 @@ export const HistogramPageSpeedScoresTooltip = ({
key={`${key}-tooltip`} key={`${key}-tooltip`}
direction="row" direction="row"
alignItems="center" alignItems="center"
gap={theme.spacing(3)} gap={theme.spacing(SPACING.XXL)}
mt={theme.spacing(1)} mt={theme.spacing(SPACING.SM)}
> >
<Box <Box
width={theme.spacing(4)} width={theme.spacing(LAYOUT.XS)}
height={theme.spacing(4)} height={theme.spacing(LAYOUT.XS)}
sx={{ borderRadius: "50%", backgroundColor: dotColor }} sx={{ borderRadius: "50%", backgroundColor: dotColor }}
/> />
<Typography <Typography