import { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import { IconAlertTriangle, IconCircleCheck, IconEdit, IconTool } from "@tabler/icons-react"; import { api, type ServerActivityEvent } from "../api/client"; import { formatDateTime } from "../utils/date"; import { formatAgo } from "../utils/duration"; import { BlockSkeleton } from "./Skeleton"; import { t } from "../i18n"; const TONE_CLASS: Record = { good: "text-green", bad: "text-red", info: "text-blue", neutral: "text-secondary", }; function EventIcon({ event }: { event: ServerActivityEvent }) { const cls = TONE_CLASS[event.tone]; if (event.kind === "maintenance") return