From d478822fe11820f066e7123a52917f75ba97e12f Mon Sep 17 00:00:00 2001 From: twwu Date: Sun, 4 Jan 2026 09:50:08 +0800 Subject: [PATCH] refactor: update locale hook in ExpirationTime component --- .../chat/chat/answer/human-input-content/expiration-time.tsx | 4 ++-- .../components/delivery-method/method-selector.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/base/chat/chat/answer/human-input-content/expiration-time.tsx b/web/app/components/base/chat/chat/answer/human-input-content/expiration-time.tsx index db9242c108..360acded07 100644 --- a/web/app/components/base/chat/chat/answer/human-input-content/expiration-time.tsx +++ b/web/app/components/base/chat/chat/answer/human-input-content/expiration-time.tsx @@ -1,6 +1,6 @@ 'use client' import { useTranslation } from 'react-i18next' -import { useI18N } from '@/context/i18n' +import { useLocale } from '@/context/i18n' import { formatRelativeTimeInZone } from './utils' type ExpirationTimeProps = { @@ -11,7 +11,7 @@ const ExpirationTime = ({ expirationTime, }: ExpirationTimeProps) => { const { t } = useTranslation() - const { locale } = useI18N() + const locale = useLocale() const relativeTime = formatRelativeTimeInZone(expirationTime, locale) return ( diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/method-selector.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/method-selector.tsx index 680cd50937..3f4935648c 100644 --- a/web/app/components/workflow/nodes/human-input/components/delivery-method/method-selector.tsx +++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/method-selector.tsx @@ -169,7 +169,7 @@ const MethodSelector: FC = ({
{t(`${i18nPrefix}.deliveryMethod.contactTip1`, { ns: 'workflow' })}
support@dify.ai }} />