isActive -> stauts === paused

This commit is contained in:
Alex Holliday committed 2025-11-19 19:06:04 +00:00
1 parent f40667615e
commit 196ebc30dc
10 files changed
+16 -22

No files matched your search

@@ -8,13 +8,7 @@ import { useTheme } from "@mui/material/styles";
export const ValueTypes = ["positive", "negative", "neutral"] as const;
export type ValueType = (typeof ValueTypes)[number];
export const StatusLabel = ({
status,
isActive,
}: {
status: MonitorStatus;
isActive?: boolean;
}) => {
export const StatusLabel = ({ status }: { status: MonitorStatus }) => {
const theme = useTheme();
const palette = getStatusPalette(status);
const transformedText =
@@ -42,7 +36,7 @@ export const StatusLabel = ({
borderRadius="50%"
marginRight="5px"
/>
{isActive === false ? "Paused" : transformedText}
{transformedText}
</BaseBox>
);
};
@@ -69,14 +69,14 @@ export const HeaderControls = ({
refetch();
}}
startIcon={
monitor?.isActive ? (
monitor.status === "paused" ? (
<Pause size={20} strokeWidth={1.5} />
) : (
<Play size={20} strokeWidth={1.5} />
)
}
>
{monitor?.isActive ? t("pause") : t("resume")}
{monitor?.status === "paused" ? t("resume") : t("pause")}
</Button>
<Button
startIcon={<Settings size={20} strokeWidth={1.5} />}