From b413b6d42df82c0743715faca3f3d8ced029aaa2 Mon Sep 17 00:00:00 2001 From: "focp212@naver.com" Date: Mon, 17 Nov 2025 10:54:01 +0900 Subject: [PATCH] =?UTF-8?q?invalid=20hook=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/constants/local-storage.ts | 1 + src/widgets/show-alert/index.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shared/constants/local-storage.ts b/src/shared/constants/local-storage.ts index 0d2df6a..a36bd2d 100644 --- a/src/shared/constants/local-storage.ts +++ b/src/shared/constants/local-storage.ts @@ -14,4 +14,5 @@ export enum StorageKeys { DeviceId = 'DEVICE_ID', AppVersion = 'APP_VERSION', LogOut = 'LOGOUT', + i18nextLng = 'i18nextLng', }; diff --git a/src/widgets/show-alert/index.tsx b/src/widgets/show-alert/index.tsx index 2ab520f..15693f2 100644 --- a/src/widgets/show-alert/index.tsx +++ b/src/widgets/show-alert/index.tsx @@ -1,9 +1,12 @@ +import { StorageKeys } from '@/shared/constants/local-storage'; +import { getLocalStorage } from '@/shared/lib'; import { Dialog } from '@/shared/ui/dialogs/dialog'; import { overlay } from 'overlay-kit'; import { useTranslation } from 'react-i18next'; export const showAlert = (msg: string, callback?: () => void) => { - const { t } = useTranslation(); + let language = getLocalStorage(StorageKeys.i18nextLng); + let btnLable = (language === 'ko')? '확인': 'confirm'; const onConfirmClick = () => { if(!!callback && typeof(callback) === 'function'){ setTimeout(() => { @@ -22,7 +25,7 @@ export const showAlert = (msg: string, callback?: () => void) => { open={ isOpen } onClose={ close } message={ msg } - buttonLabel={ [t('common.confirm')] } + buttonLabel={ [btnLable] } onConfirmClick={ onConfirmClick } /> );