import { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import ReadNowButton from "../components/ReadNowButton"; import { api, type CurrentUser, type TechnitiumInstance } from "../api/client"; import EmptyState from "../components/EmptyState"; import TimeAgo from "../components/TimeAgo"; import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { formatAgo } from "../utils/duration"; import { readableError } from "../utils/errors"; import PageIntro from "../components/PageIntro"; function Badge({ a }: { a: TechnitiumInstance }) { if (!a.enabled) return Off; if (!a.state) return Not read yet; if (!a.fresh) return Can’t be read; if (a.problems.some((x) => x.severity === "critical")) return Needs a look; if (a.problems.length > 0) return Needs a look; return In order; } function Tile({ label, value, sub, tone }: { label: string; value: string; sub?: string | null; tone?: "bad" | "warn" }) { return (
| Node | Role | State | Version | Last seen |
|---|---|---|---|---|
| {n.url ? ( {n.name} ) : ( n.name )} | {n.type} | {st.label} | {n.version ?? "—"} | {n.state.toLowerCase() === "self" ? "—" : n.lastSeen ? |