From e6fa749a28e55b9ea85a5ccae71346823fd2567c Mon Sep 17 00:00:00 2001 From: kunish Date: Sun, 13 Oct 2024 12:03:06 +0800 Subject: [PATCH] fix(i18n): time locale not working --- src/helpers/time.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/time.ts b/src/helpers/time.ts index 0f87049..b10ea87 100644 --- a/src/helpers/time.ts +++ b/src/helpers/time.ts @@ -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()