import { pad } from "../lib/utils"; import { type Uptime } from "../lib/getStats"; interface UptimeCardProps { uptime: Uptime | null; delay?: number; } export default function UptimeCard({ uptime, delay = 0 }: UptimeCardProps) { return (

Uptime

{uptime ? (
{[ { val: uptime.days, unit: "days" }, { val: uptime.hours, unit: "hrs" }, { val: uptime.minutes, unit: "min" }, ].map(({ val, unit }, i) => (
{pad(val)} {unit}
))}
) : (
)}
); }