setting
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { useAppAlarmConsentMutation } from '@/entities/alarm/api/use-app-alarm-consent-mutation';
|
||||
import { useAppAlarmFindMutation } from '@/entities/alarm/api/use-app-alarm-find-mutation';
|
||||
import { AppAlarmConsentParams, AppAlarmConsentResponse, AppAlarmFindParams, AppAlarmFindResponse, MERCHANT_ADMIN_APP } from '@/entities/alarm/model/types';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import { LoginTypeBottomSheet } from '@/entities/alarm/ui/login-type-bottom-sheet';
|
||||
import { ServiceLanguageBottomSheet } from '@/entities/alarm/ui/service-language-bottom-sheet';
|
||||
import { AppLanguage, HeaderType, LoginType } from '@/entities/common/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
@@ -16,6 +18,11 @@ export const SettingPage = () => {
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetFooterMode(false);
|
||||
|
||||
const [loginTypeBottomSheetOn, setLoginTypeBottomSheetOn] = useState<boolean>(false);
|
||||
const [serviceLanguageBottomSheetOn, setServiceLanguageBottomSheetOn] = useState<boolean>(false);
|
||||
const [loginType, setLoginType] = useState<LoginType>(LoginType['Id/Pw']);
|
||||
const [appLanguage, setAppLanguage] = useState<AppLanguage>(AppLanguage.KO);
|
||||
|
||||
const {mutateAsync: appAlarmFind} = useAppAlarmFindMutation();
|
||||
const {mutateAsync: appAlarmConsent} = useAppAlarmConsentMutation();
|
||||
|
||||
@@ -28,8 +35,7 @@ export const SettingPage = () => {
|
||||
'62': false,
|
||||
'15': false
|
||||
});
|
||||
|
||||
|
||||
|
||||
const onClickPrivacyPolicy = () => {
|
||||
window.open('https://www.nicevan.co.kr/privacy-policy', '_blank');
|
||||
};
|
||||
@@ -187,14 +193,20 @@ export const SettingPage = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="settings-row link">
|
||||
<div
|
||||
className="settings-row link"
|
||||
onClick={ () => setLoginTypeBottomSheetOn(true) }
|
||||
>
|
||||
<div className="settings-row-title bd-style">로그인 방식 설정</div>
|
||||
<div className="click">ID/PW</div>
|
||||
<div className="click">{ loginType }</div>
|
||||
</div>
|
||||
|
||||
<div className="settings-row link nopadding">
|
||||
<div
|
||||
className="settings-row link nopadding"
|
||||
onClick={ () => setServiceLanguageBottomSheetOn(true) }
|
||||
>
|
||||
<div className="settings-row-title bd-style">서비스 언어 설정</div>
|
||||
<div className="click">기기 설정 언어</div>
|
||||
<div className="click">{ appLanguage }</div>
|
||||
</div>
|
||||
|
||||
<div className="settings-divider"></div>
|
||||
@@ -219,6 +231,22 @@ export const SettingPage = () => {
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{ !!loginTypeBottomSheetOn &&
|
||||
<LoginTypeBottomSheet
|
||||
loginTypeBottomSheetOn={ loginTypeBottomSheetOn }
|
||||
setLoginTypeBottomSheetOn={ setLoginTypeBottomSheetOn }
|
||||
loginType={ loginType }
|
||||
setLoginType={ setLoginType }
|
||||
></LoginTypeBottomSheet>
|
||||
}
|
||||
{ !!serviceLanguageBottomSheetOn &&
|
||||
<ServiceLanguageBottomSheet
|
||||
serviceLanguageBottomSheetOn={ serviceLanguageBottomSheetOn }
|
||||
setServiceLanguageBottomSheetOn={ setServiceLanguageBottomSheetOn }
|
||||
appLanguage={ appLanguage }
|
||||
setAppLanguage={ setAppLanguage }
|
||||
></ServiceLanguageBottomSheet>
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user