import { ActionIcon, Menu } from "@mantine/core"; import { IconDots, IconEdit, IconTrash } from "@tabler/icons-react"; import { modals } from "@mantine/modals"; import { useTranslation } from "react-i18next"; type CommentMenuProps = { onEditComment: () => void; onDeleteComment: () => void; }; function CommentMenu({ onEditComment, onDeleteComment }: CommentMenuProps) { const { t } = useTranslation(); //@ts-ignore const openDeleteModal = () => modals.openConfirmModal({ title: t("Are you sure you want to delete this comment?"), centered: true, labels: { confirm: t("Delete"), cancel: t("Cancel") }, confirmProps: { color: "red" }, onConfirm: onDeleteComment, }); return (
); } export default CommentMenu;