fix(i18n): replace useTranslation with useLazyTranslation in Base64Converter

Fix missing translations by ensuring base64Converter namespace is dynamically loaded.
This commit is contained in:
雨霖铃
2026-05-23 13:07:31 +08:00
parent e0888c7fb3
commit cf05df7022
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import TextInputArea from '@/components/TextInputArea';
import { useTranslation } from 'react-i18next';
import { useLazyTranslation } from '@/utils/useLazyTranslation';
import CopyButton from '@/components/CopyButton';
import { base64ToText, textToBase64 } from '@/utils/base64Converter';
import SwitchButtonGroup from '@/components/SwitchButtonGroup';
@@ -20,7 +20,7 @@ interface TextModeProps {
}
export default function TextMode({ onSwitchToImageMode }: TextModeProps = {}) {
const { t } = useTranslation('base64Converter');
const { t } = useLazyTranslation('base64Converter');
// 1. 纯净的核心源状态机:只保留输入源和转换方向
const [input, setInput] = useState('');