* Format a timestamp as "h:mm:ssa" (e.g., "1:30:45pm"). * Replaces date-fns format() to avoid pulling in a 39MB dependency for one call.
(date: Date)
| 10 | * Replaces date-fns format() to avoid pulling in a 39MB dependency for one call. |
| 11 | */ |
| 12 | function formatTime(date: Date): string { |
| 13 | const h = date.getHours() % 12 || 12; |
| 14 | const m = String(date.getMinutes()).padStart(2, '0'); |
| 15 | const s = String(date.getSeconds()).padStart(2, '0'); |
| 16 | const ampm = date.getHours() < 12 ? 'am' : 'pm'; |
| 17 | return `${h}:${m}:${s}${ampm}`; |
| 18 | } |
| 19 | import { getPlatform } from 'src/utils/platform.js'; |
| 20 | export function SandboxViolationExpandedView() { |
| 21 | const $ = _c(15); |