responsive
This commit is contained in:
1 parent
4e3e580179
commit
f2d2687d2a
2 files changed
+6
-5
No files matched your search
@@ -96,8 +96,8 @@ export const MonitorsList = ({ statusPage, monitors }: MonitorsListProps) => {
|
|||||||
<Box sx={{ overflow: "hidden", minWidth: 0, flex: 1 }}>
|
<Box sx={{ overflow: "hidden", minWidth: 0, flex: 1 }}>
|
||||||
{chartType === "histogram" ? (
|
{chartType === "histogram" ? (
|
||||||
<HistogramResponseTime
|
<HistogramResponseTime
|
||||||
height={100}
|
height={{ xs: 50, md: 100 }}
|
||||||
gap={theme.spacing(5)}
|
gap={{ xs: theme.spacing(0.5), md: theme.spacing(5) }}
|
||||||
checks={monitor?.checks?.slice().reverse() ?? []}
|
checks={monitor?.checks?.slice().reverse() ?? []}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Link } from "react-router-dom";
|
|||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
|
|
||||||
import { useTheme } from "@mui/material";
|
import { useMediaQuery, useTheme } from "@mui/material";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useIsAdmin } from "@/Hooks/useIsAdmin";
|
import { useIsAdmin } from "@/Hooks/useIsAdmin";
|
||||||
import { useLocation, useParams } from "react-router-dom";
|
import { useLocation, useParams } from "react-router-dom";
|
||||||
@@ -20,6 +20,7 @@ const StatusPageView = () => {
|
|||||||
const { url } = useParams();
|
const { url } = useParams();
|
||||||
const isAdmin = useIsAdmin();
|
const isAdmin = useIsAdmin();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
|
||||||
const isPublic = location.pathname.startsWith("/status/public");
|
const isPublic = location.pathname.startsWith("/status/public");
|
||||||
|
|
||||||
const apiUrl = url ? `/status-page/${url}?type=uptime` : null;
|
const apiUrl = url ? `/status-page/${url}?type=uptime` : null;
|
||||||
@@ -61,8 +62,8 @@ const StatusPageView = () => {
|
|||||||
let sx: React.CSSProperties = {};
|
let sx: React.CSSProperties = {};
|
||||||
if (isPublic) {
|
if (isPublic) {
|
||||||
sx.paddingTop = theme.spacing(20);
|
sx.paddingTop = theme.spacing(20);
|
||||||
sx.paddingLeft = "20vw";
|
sx.paddingLeft = isSmall ? "5vw" : "20vw";
|
||||||
sx.paddingRight = "20vw";
|
sx.paddingRight = isSmall ? "5vw" : "20vw";
|
||||||
}
|
}
|
||||||
|
|
||||||
const logoSrc = statusPage.logo?.data
|
const logoSrc = statusPage.logo?.data
|
||||||
|
|||||||
Reference in new issue
Block a user