({ ms, raw }: { ms: number | null; raw: string | undefined })
| 204 | } |
| 205 | |
| 206 | function TsValue({ ms, raw }: { ms: number | null; raw: string | undefined }) { |
| 207 | if (ms === null) { |
| 208 | return raw !== undefined && raw !== '' ? ( |
| 209 | <span className="font-mono text-[12px] text-fg-3 break-all">{raw}</span> |
| 210 | ) : ( |
| 211 | <span className="font-mono text-[12px] text-fg-3">(none)</span> |
| 212 | ); |
| 213 | } |
| 214 | return ( |
| 215 | <span className="flex flex-wrap items-center gap-2"> |
| 216 | <span className="font-mono text-[12px] text-fg-0 tabular"> |
| 217 | {formatAbsoluteTime(ms)} |
| 218 | </span> |
| 219 | <span className="font-mono text-[11px] text-fg-3"> |
| 220 | ({formatRelativeTime(ms)}) |
| 221 | </span> |
| 222 | </span> |
| 223 | ); |
| 224 | } |
| 225 | |
| 226 | function parseIso(input: string | undefined): number | null { |
| 227 | if (input === undefined || input === '') return null; |
nothing calls this directly
no test coverage detected