remove unused vars

This commit is contained in:
Alex Holliday committed 2026-08-18 09:38:34 -07:00
1 parent c15d6e0851
commit 840c936501
4 files changed
+4 -9

No files matched your search

@@ -12,7 +12,6 @@ import { useGet } from "@/Hooks/UseApi";
import { import {
isStatusPageRange, isStatusPageRange,
resolveStatusPageTheme, resolveStatusPageTheme,
STATUS_PAGE_RANGES,
type StatusPageRange, type StatusPageRange,
} from "@/Types/StatusPage"; } from "@/Types/StatusPage";
import { import {
@@ -205,7 +205,7 @@ export const BaseStatusPage = ({
const cells = const cells =
range === "latest" range === "latest"
? checksToCells(monitor.recentChecks ?? [], t) ? checksToCells(monitor.recentChecks ?? [])
: dailyBucketsToCells( : dailyBucketsToCells(
monitor.dailyChecks ?? [], monitor.dailyChecks ?? [],
STATUS_PAGE_RANGE_DAYS[range], STATUS_PAGE_RANGE_DAYS[range],
@@ -64,7 +64,7 @@ const padCells = (cells: ChartCell[], length: number): ChartCell[] => [
), ),
]; ];
export const checksToCells = (checks: CheckSnapshot[], t: TFunction): ChartCell[] => { export const checksToCells = (checks: CheckSnapshot[]): ChartCell[] => {
const source = checks.slice(-MAX_RECENT_CHECKS); const source = checks.slice(-MAX_RECENT_CHECKS);
const heights = computeBarHeights(source); const heights = computeBarHeights(source);
const cells = source.map( const cells = source.map(
@@ -100,9 +100,9 @@ export const dailyBucketsToCells = (
heatKind: heatKind:
barKind === "up" barKind === "up"
? classifyResponseTime(true, bucket.avgResponseTime ?? 0) ? classifyResponseTime(true, bucket.avgResponseTime ?? 0)
: barKind, // degraded/down days keep their outcome color in the heatmap too : barKind,
heightPct: heights.get(date) ?? MIN_HEIGHT_PCT, heightPct: heights.get(date) ?? MIN_HEIGHT_PCT,
responseTime: bucket.avgResponseTime ?? 0, // null (no RT data that day) → 0, excluded from footer stats like empty cells responseTime: bucket.avgResponseTime ?? 0,
tooltip: <ThemedDailyTooltip bucket={bucket} />, tooltip: <ThemedDailyTooltip bucket={bucket} />,
ariaLabel: t("pages.statusPages.monitorsList.chart.dayAria", { ariaLabel: t("pages.statusPages.monitorsList.chart.dayAria", {
date, date,
@@ -4,7 +4,6 @@ import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import type { SxProps, Theme } from "@mui/material/styles"; import type { SxProps, Theme } from "@mui/material/styles";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import type { CheckSnapshot } from "@/Types/Check";
import { formatMs } from "@/Utils/TimeUtils"; import { formatMs } from "@/Utils/TimeUtils";
import type { import type {
BarKind, BarKind,
@@ -19,9 +18,6 @@ interface Props {
statsGap?: number; statsGap?: number;
} }
const tone = (check: CheckSnapshot): Exclude<BarKind, "empty"> =>
check.status ? "up" : "down";
export const ThemedHistogram = ({ export const ThemedHistogram = ({
cells, cells,
containerSx, containerSx,