(props: { epoch: any; className?: string })
| 101 | } |
| 102 | |
| 103 | export function TimeText(props: { epoch: any; className?: string }): React.ReactElement { |
| 104 | if (!props.epoch) { |
| 105 | return <span className={props.className || "hermes-lcm-dim"}>—</span>; |
| 106 | } |
| 107 | const absolute = fmtAbsoluteTime(props.epoch); |
| 108 | let dateTime = ""; |
| 109 | try { |
| 110 | dateTime = new Date(Number(props.epoch) * 1000).toISOString(); |
| 111 | } catch (e) { /* best-effort */ } |
| 112 | return ( |
| 113 | <time |
| 114 | className={props.className || "hermes-lcm-dim"} |
| 115 | title={absolute} |
| 116 | dateTime={dateTime || undefined} |
| 117 | > |
| 118 | {fmtTime(props.epoch)} |
| 119 | </time> |
| 120 | ); |
| 121 | } |
| 122 | |
| 123 | export function CopyButton(props: { text: any; label?: string; title?: string }): React.ReactElement { |
| 124 | const [status, setStatus] = useState<"idle" | "copied" | "failed">("idle"); |
nothing calls this directly
no test coverage detected