로그인 타입 및 서비스 언어 변경 로직 개선
- 생체인증 등록 시 AppBridge 연동 추가 - 중복 변경 방지 로직 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user