mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: date format i18n
This commit is contained in:
@@ -69,6 +69,8 @@ const domainEvent = {
|
|||||||
'enum validation expiration': () => t`ENUM validation expiration`
|
'enum validation expiration': () => t`ENUM validation expiration`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const locale = navigator.language.split('-')[0]
|
||||||
|
|
||||||
export default function DomainSearchPage() {
|
export default function DomainSearchPage() {
|
||||||
|
|
||||||
const [domain, setDomain] = useState<Domain | null>()
|
const [domain, setDomain] = useState<Domain | null>()
|
||||||
@@ -167,7 +169,7 @@ export default function DomainSearchPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
label: new Date(date).toUTCString(),
|
label: new Date(date).toLocaleString(locale),
|
||||||
children: Object.keys(domainEvent).includes(action) ? domainEvent[action as keyof typeof domainEvent]() : action,
|
children: Object.keys(domainEvent).includes(action) ? domainEvent[action as keyof typeof domainEvent]() : action,
|
||||||
color,
|
color,
|
||||||
dot,
|
dot,
|
||||||
|
|||||||
Reference in New Issue
Block a user