Add and implement fix-date

Safari does not handle certain date formats well, and this library fix-date fixes it practically invisibly.
This commit is contained in:
Justin Edmund 2022-12-27 10:39:49 -08:00
parent 265cab0527
commit 8d0860893e
3 changed files with 13 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import { useRouter } from 'next/router'
import { useSnapshot } from 'valtio'
import { useTranslation } from 'next-i18next'
import classNames from 'classnames'
import 'fix-date'
import { accountState } from '~utils/accountState'
import { formatTimeAgo } from '~utils/timeAgo'

11
package-lock.json generated
View file

@ -18,6 +18,7 @@
"axios": "^0.25.0",
"classnames": "^2.3.1",
"cookies-next": "^2.1.1",
"fix-date": "^1.1.6",
"i18next": "^21.6.13",
"i18next-browser-languagedetector": "^6.1.3",
"i18next-http-backend": "^1.3.2",
@ -5528,6 +5529,11 @@
"node": ">=4"
}
},
"node_modules/fix-date": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/fix-date/-/fix-date-1.1.6.tgz",
"integrity": "sha512-YN9InFic51O88wkDUSCKoj0pbWS7p4ucviZzeKdiXg48vtfpqlHYYg/U92DwX+S4YSzNjtHKeHYiuVo86Gatpw=="
},
"node_modules/flat-cache": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
@ -12030,6 +12036,11 @@
"locate-path": "^2.0.0"
}
},
"fix-date": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/fix-date/-/fix-date-1.1.6.tgz",
"integrity": "sha512-YN9InFic51O88wkDUSCKoj0pbWS7p4ucviZzeKdiXg48vtfpqlHYYg/U92DwX+S4YSzNjtHKeHYiuVo86Gatpw=="
},
"flat-cache": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",

View file

@ -23,6 +23,7 @@
"axios": "^0.25.0",
"classnames": "^2.3.1",
"cookies-next": "^2.1.1",
"fix-date": "^1.1.6",
"i18next": "^21.6.13",
"i18next-browser-languagedetector": "^6.1.3",
"i18next-http-backend": "^1.3.2",