fix(i18n): time locale not working

This commit is contained in:
kunish 2024-10-13 12:03:06 +08:00
parent e1cbbd8a0e
commit e6fa749a28
No known key found for this signature in database
GPG Key ID: 67D3ACD788F3A7CD

View File

@ -1,4 +1,5 @@
import dayjs, { locale } from 'dayjs'
import dayjs from 'dayjs'
import { locale } from '~/i18n'
export const formatTimeFromNow = (time: number | string) =>
dayjs(time).locale(locale()).fromNow()