remove unused utils, convert utils to TS

This commit is contained in:
Alex Holliday committed 2026-02-12 19:13:53 +00:00
1 parent 4e3a82d25f
commit cafea2bf5d
19 files changed
+40 -711

No files matched your search

@@ -9,13 +9,13 @@ import type { Monitor } from "@/Types/Monitor";
import type { ActionMenuItem } from "@/Components/v2/actions-menu";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { TypeToPathMap } from "@/Utils/monitorUtilsLegacy.js";
import { formatDateWithTz } from "@/Utils/TimeUtils";
import { useSelector } from "react-redux";
import type { RootState } from "@/Types/state";
import Typography from "@mui/material/Typography";
import { useTheme } from "@mui/material/styles";
import Box from "@mui/material/Box";
import { getMonitorPath } from "@/Utils/MonitorUtils";
interface IncidentsTableProps {
title?: string;
@@ -62,7 +62,7 @@ export const IncidentsTable = ({
label: t("pages.incidents.table.actions.goToMonitor"),
action: () => {
if (monitor) {
const path = TypeToPathMap[monitor.type as keyof typeof TypeToPathMap];
const path = getMonitorPath(monitor.type);
if (path && monitor.id) {
navigate(`/${path}/${monitor.id}`);
}