diff --git a/client/src/Components/v2/ActionsMenu/index.tsx b/client/src/Components/v2/ActionsMenu/index.tsx index fb5f48fc9..5b606e5b0 100644 --- a/client/src/Components/v2/ActionsMenu/index.tsx +++ b/client/src/Components/v2/ActionsMenu/index.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import React, { useState } from "react"; import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; import IconButton from "@mui/material/IconButton"; @@ -6,7 +6,7 @@ import Settings from "@/assets/icons/settings-bold.svg?react"; export type ActionMenuItem = { id: number | string; - label: string; + label: React.ReactNode; action: Function; closeMenu?: boolean; }; diff --git a/client/src/Pages/v2/Uptime/MonitorTable.tsx b/client/src/Pages/v2/Uptime/MonitorTable.tsx index 2d02359c1..151fc31b4 100644 --- a/client/src/Pages/v2/Uptime/MonitorTable.tsx +++ b/client/src/Pages/v2/Uptime/MonitorTable.tsx @@ -8,8 +8,9 @@ import { useMediaQuery } from "@mui/material"; import { useTheme } from "@mui/material/styles"; import { ActionsMenu } from "@/Components/v2/ActionsMenu"; import type { ActionMenuItem } from "@/Components/v2/ActionsMenu"; +import Typography from "@mui/material/Typography"; -const getActions = (t: Function): ActionMenuItem[] => { +const getActions = (theme: any, t: Function): ActionMenuItem[] => { return [ { id: 1, @@ -57,7 +58,7 @@ const getActions = (t: Function): ActionMenuItem[] => { }, { id: 7, - label: "Delete", + label: Remove, action: () => { console.log("Open delete"); }, @@ -66,7 +67,7 @@ const getActions = (t: Function): ActionMenuItem[] => { ]; }; -const getHeaders = (t: Function) => { +const getHeaders = (theme: any, t: Function) => { const headers: Header[] = [ { id: "name", @@ -104,7 +105,7 @@ const getHeaders = (t: Function) => { id: "actions", content: t("actions"), render: (row) => { - return ; + return ; }, }, ]; @@ -116,7 +117,7 @@ export const MonitorTable = ({ monitors }: { monitors: IMonitor[] }) => { const theme = useTheme(); const isSmall = useMediaQuery(theme.breakpoints.down("md")); - let headers = getHeaders(t); + let headers = getHeaders(theme, t); if (isSmall) { headers = headers.filter((h) => h.id !== "histogram");