(value: string | null)
| 51 | type CreatedKey = ApiKeySummary & { readonly value: string }; |
| 52 | |
| 53 | const formatDate = (value: string | null): string => { |
| 54 | if (!value) return "Never"; |
| 55 | const date = new Date(value); |
| 56 | return Number.isNaN(date.getTime()) |
| 57 | ? value |
| 58 | : new Intl.DateTimeFormat(undefined, { |
| 59 | month: "short", |
| 60 | day: "numeric", |
| 61 | year: "numeric", |
| 62 | }).format(date); |
| 63 | }; |
| 64 | |
| 65 | const defaultKeyName = (kind: string): string => |
| 66 | `${kind} ${new Intl.DateTimeFormat(undefined, { |