瀏覽代碼

fix(web): add dayjs relativeTime plugin (#22761)

tags/1.7.0
quicksand 3 月之前
父節點
當前提交
90c4df7919
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      web/app/components/tools/mcp/hooks.ts

+ 3
- 0
web/app/components/tools/mcp/hooks.ts 查看文件

@@ -1,7 +1,10 @@
import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import { useCallback } from 'react'
import { useI18N } from '@/context/i18n'

dayjs.extend(relativeTime)

export const useFormatTimeFromNow = () => {
const { locale } = useI18N()
const formatTimeFromNow = useCallback((time: number) => {

Loading…
取消
儲存