From b4e4ec11109e453fbab9381036d98462b61abc0e Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 9 Dec 2025 21:15:27 +0000 Subject: [PATCH] ts --- client/src/App.tsx | 5 ++--- client/src/components/design-elements/StatBox.tsx | 2 +- client/src/components/inputs/ButtonGroup.tsx | 2 -- client/src/components/inputs/SwitchSettings.tsx | 8 ++++++-- client/src/pages/checks/ChecksTable.tsx | 10 ++-------- client/src/pages/uptime/UptimeMonitors.tsx | 3 +-- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index c86e2b973..17af1d778 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -7,7 +7,6 @@ import { useAppSelector } from "./hooks/AppHooks"; import { BrowserRouter } from "react-router-dom"; import { AuthVerifier } from "@/components/auth-verifier"; import { ToastContainer } from "react-toastify"; -import { colors } from "@/theme/palette"; function App() { const mode = useAppSelector((state) => state.ui.mode); @@ -26,8 +25,8 @@ function App() { theme={mode} style={ { - "--toastify-color-progress-light": colors.blueGray450, - "--toastify-color-progress-dark": colors.blueGray450, + "--toastify-color-progress-light": "#7C8BA1", + "--toastify-color-progress-dark": "#7C8BA1", } as React.CSSProperties } /> diff --git a/client/src/components/design-elements/StatBox.tsx b/client/src/components/design-elements/StatBox.tsx index a83215ac9..637610a5f 100644 --- a/client/src/components/design-elements/StatBox.tsx +++ b/client/src/components/design-elements/StatBox.tsx @@ -2,7 +2,7 @@ import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; import Box from "@mui/material/Box"; import { useTheme } from "@mui/material/styles"; -import { lighten, darken } from "@mui/material/styles"; +import { lighten } from "@mui/material/styles"; import useMediaQuery from "@mui/material/useMediaQuery"; import type { PaletteKey } from "@/theme/theme"; import { BaseBox, TooltipWithInfo } from "@/components/design-elements"; diff --git a/client/src/components/inputs/ButtonGroup.tsx b/client/src/components/inputs/ButtonGroup.tsx index c2afeb769..48c1c2090 100644 --- a/client/src/components/inputs/ButtonGroup.tsx +++ b/client/src/components/inputs/ButtonGroup.tsx @@ -5,7 +5,6 @@ import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; import type { ButtonGroupProps } from "@mui/material/ButtonGroup"; import { ChevronDown } from "lucide-react"; -import { useTheme } from "@mui/material/styles"; export const ButtonGroupInput: React.FC = ({ orientation, @@ -14,7 +13,6 @@ export const ButtonGroupInput: React.FC = ({ ...props }) => { const isVertical = orientation === "vertical"; - const theme = useTheme(); if (!isVertical) { return ( diff --git a/client/src/components/inputs/SwitchSettings.tsx b/client/src/components/inputs/SwitchSettings.tsx index 5a4d7c06c..50fb44364 100644 --- a/client/src/components/inputs/SwitchSettings.tsx +++ b/client/src/components/inputs/SwitchSettings.tsx @@ -10,6 +10,7 @@ import { useMemo, useState } from "react"; import { useTheme } from "@mui/material/styles"; import { Tooltip } from "@/components/design-elements"; import { config } from "@/config/index"; +const ENV_VAR = import.meta.env.VITE_APP_DEPLOYMENT_MODE; const DEPLOYMENT_MODE = config.DEPLOYMENT_MODE; const IS_SAAS = DEPLOYMENT_MODE === "saas"; @@ -32,12 +33,13 @@ export const SettingsSwitch = () => { handleClose(); }; - const user = useAppSelector((state) => state.auth.user); + const user = useAppSelector((state: any) => state.auth.user); const orgPermissions = user?.org?.permissions || []; // Normalize and memoize permissions for robust checks const perms = useMemo( - () => orgPermissions.map((p) => (p ?? "").toString().trim().toLowerCase()), + () => + orgPermissions.map((p: any) => (p ?? "").toString().trim().toLowerCase()), [orgPermissions] ); const hasTeamEdit = @@ -64,6 +66,8 @@ export const SettingsSwitch = () => { [perms] ); + console.log("ENV VAR: ", ENV_VAR); + console.log("DEPLOYMENT_MODE: ", DEPLOYMENT_MODE); console.log("Show billing: ", showBilling); console.log(JSON.stringify(perms, null, 2)); console.log("IS_SAAS: ", IS_SAAS); diff --git a/client/src/pages/checks/ChecksTable.tsx b/client/src/pages/checks/ChecksTable.tsx index 3f4d1e367..fc597d124 100644 --- a/client/src/pages/checks/ChecksTable.tsx +++ b/client/src/pages/checks/ChecksTable.tsx @@ -39,7 +39,7 @@ export const ChecksTable = ({ const headers: Header[] = [ { id: "monitorName", - content: "Monitor name", + content: t("incidentsTableMonitorName"), render: (row) => { return row.metadata?.monitorId?.name || "N/A"; }, @@ -102,13 +102,7 @@ export const ChecksTable = ({ return ( - { - alert("not yet"); - }} - /> +
{ entitlement="monitorsMax" entitlementCount={count} /> - +