로그인 타입 및 서비스 언어 변경 로직 개선

- 생체인증 등록 시 AppBridge 연동 추가
- 중복 변경 방지 로직 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-10-28 13:52:41 +09:00
parent 95cc870dbc
commit b06424fe1b
2 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import { LoginType } from "@/entities/common/model/types";
import { IMAGE_ROOT } from "@/shared/constants/common";
import { useTranslation } from "react-i18next";
import { useAppBridge } from "@/hooks/useAppBridge";
export interface LoginTypeBottomSheetProps {
loginTypeBottomSheetOn: boolean;
@@ -16,12 +17,19 @@ export const LoginTypeBottomSheet = ({
setLoginType
}: LoginTypeBottomSheetProps) => {
const { t } = useTranslation();
const { openBiometricRegistrationPopup } = useAppBridge();
const onClickToClose = () => {
setLoginTypeBottomSheetOn(false);
};
const onChangeLoginType = (type: string) => {
setLoginType(type);
const onChangeLoginType = async (type: string) => {
if (loginType !== type) {
if (type === 'BIOMETRIC') {
await openBiometricRegistrationPopup();
} else {
setLoginType(type);
}
}
onClickToClose();
};

View File

@@ -24,8 +24,10 @@ export const ServiceLanguageBottomSheet = ({
setServiceLanguageBottomSheetOn(false);
};
const onChangeServiceLanguage = (language: AppLanguage) => {
setAppLanguage(language);
changeLanguage(language);
if (appLanguage !== language) {
setAppLanguage(language);
changeLanguage(language);
}
onClickToClose();
};