diff --git a/client/src/Pages/StatusPage/Status/themes/shared/ThemedChartTooltip.tsx b/client/src/Pages/StatusPage/Status/themes/shared/ThemedChartTooltip.tsx index c4a528731..597000b17 100644 --- a/client/src/Pages/StatusPage/Status/themes/shared/ThemedChartTooltip.tsx +++ b/client/src/Pages/StatusPage/Status/themes/shared/ThemedChartTooltip.tsx @@ -4,8 +4,10 @@ import Typography from "@mui/material/Typography"; import prettyMilliseconds from "pretty-ms"; import { formatDateWithTz } from "@/Utils/TimeUtils"; import { useStatusPageTheme } from "@/Pages/StatusPage/Status/themes/StatusPageThemeProvider"; +import { useTranslation } from "react-i18next"; export const ThemedChartTooltip = ({ check }: { check: CheckSnapshot }) => { + const { t } = useTranslation(); const { timezone } = useStatusPageTheme(); return ( diff --git a/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx index 5340f4637..375fd1b0e 100644 --- a/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx +++ b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHeatmap.tsx @@ -1,14 +1,9 @@ import Tooltip from "@mui/material/Tooltip"; import Box from "@mui/material/Box"; -import Stack from "@mui/material/Stack"; -import Typography from "@mui/material/Typography"; import type { SxProps, Theme } from "@mui/material/styles"; import { useTranslation } from "react-i18next"; import type { CheckSnapshot } from "@/Types/Check"; -import { formatDateWithTz } from "@/Utils/TimeUtils"; import { MAX_RECENT_CHECKS } from "@/Types/Monitor"; -import { useStatusPageTheme } from "../StatusPageThemeProvider"; -import prettyMilliseconds from "pretty-ms"; import { ThemedChartTooltip } from "@/Pages/StatusPage/Status/themes/shared/ThemedChartTooltip"; const CELLS = MAX_RECENT_CHECKS; @@ -31,7 +26,6 @@ const classify = (check: CheckSnapshot): Exclude => { export const ThemedHeatmap = ({ checks, containerSx, cellSx }: Props) => { const { t } = useTranslation(); - const { timezone } = useStatusPageTheme(); const source = checks.slice(-CELLS); const padded: (CheckSnapshot | null)[] = [ diff --git a/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx index 81d928db9..3dd7a1f66 100644 --- a/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx +++ b/client/src/Pages/StatusPage/Status/themes/shared/ThemedHistogram.tsx @@ -2,15 +2,12 @@ import { useMemo } from "react"; import Tooltip from "@mui/material/Tooltip"; import Box from "@mui/material/Box"; import Stack from "@mui/material/Stack"; -import Typography from "@mui/material/Typography"; import type { SxProps, Theme } from "@mui/material/styles"; import { useTranslation } from "react-i18next"; import type { CheckSnapshot } from "@/Types/Check"; -import { formatDateWithTz } from "@/Utils/TimeUtils"; import { MAX_RECENT_CHECKS } from "@/Types/Monitor"; import { useStatusPageTheme } from "../StatusPageThemeProvider"; import { computeBarHeights } from "@/Utils/DataUtils"; -import prettyMilliseconds from "pretty-ms"; import { ThemedChartTooltip } from "@/Pages/StatusPage/Status/themes/shared/ThemedChartTooltip"; const CELLS = MAX_RECENT_CHECKS; const MIN_HEIGHT_PCT = 6; @@ -36,7 +33,6 @@ export const ThemedHistogram = ({ statsGap = 1, }: Props) => { const { t } = useTranslation(); - const { timezone } = useStatusPageTheme(); const { padded, heights, avg, peak } = useMemo(() => { const source = checks.slice(-CELLS);