설정 페이지 텍스트 다국어화 및 UI 개선
- 하드코딩된 한국어 텍스트를 번역 키로 변경 - 이용약관 링크를 별도 행으로 분리 - 로그아웃 확인 Dialog 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,9 @@
|
|||||||
"serviceLanguage": {
|
"serviceLanguage": {
|
||||||
"title": "Please select language.",
|
"title": "Please select language.",
|
||||||
"notice": "※ If the language is not supported, English will be set automatically"
|
"notice": "※ If the language is not supported, English will be set automatically"
|
||||||
}
|
},
|
||||||
|
"termsAndPrivacy": "Terms of Service and Privacy Policy",
|
||||||
|
"logoutConfirm": "Do you want to logout?"
|
||||||
},
|
},
|
||||||
"support": {
|
"support": {
|
||||||
"notice": {
|
"notice": {
|
||||||
|
|||||||
@@ -99,7 +99,9 @@
|
|||||||
"serviceLanguage": {
|
"serviceLanguage": {
|
||||||
"title": "서비스 언어를 선택하세요.",
|
"title": "서비스 언어를 선택하세요.",
|
||||||
"notice": "※ 미지원 언어일 경우 ENGLISH 자동 설정"
|
"notice": "※ 미지원 언어일 경우 ENGLISH 자동 설정"
|
||||||
}
|
},
|
||||||
|
"termsAndPrivacy": "이용약관 및 개인정보 처리방침",
|
||||||
|
"logoutConfirm": "로그아웃 하시겠습니까?"
|
||||||
},
|
},
|
||||||
"support": {
|
"support": {
|
||||||
"notice": {
|
"notice": {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { ChangeEvent, useCallback, useEffect, useState } from 'react';
|
|||||||
import { useAppBridge } from '@/hooks/useAppBridge';
|
import { useAppBridge } from '@/hooks/useAppBridge';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import appBridge from '@/utils/appBridge';
|
import appBridge from '@/utils/appBridge';
|
||||||
|
import { Dialog } from '@/shared/ui/dialogs/dialog';
|
||||||
|
|
||||||
export const SettingPage = () => {
|
export const SettingPage = () => {
|
||||||
let userInfo = useStore.getState().UserStore.userInfo;
|
let userInfo = useStore.getState().UserStore.userInfo;
|
||||||
@@ -55,13 +56,15 @@ export const SettingPage = () => {
|
|||||||
'62': false,
|
'62': false,
|
||||||
'15': false
|
'15': false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [dialogOpen, setDialogOpen] = useState<boolean>(false);
|
||||||
|
|
||||||
const onClickPrivacyPolicy = () => {
|
const onClickPolicy = () => {
|
||||||
window.open('https://www.nicevan.co.kr/privacy-policy', '_blank');
|
window.open('https://www.nicepay.co.kr/cs/terms/policy1.do', '_blank');
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickLogout = () => {
|
const onClickLogout = () => {
|
||||||
logout();
|
setDialogOpen(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkPushNotificationStatus = useCallback(() => {
|
const checkPushNotificationStatus = useCallback(() => {
|
||||||
@@ -415,21 +418,12 @@ export const SettingPage = () => {
|
|||||||
|
|
||||||
<div className="settings-divider"></div>
|
<div className="settings-divider"></div>
|
||||||
|
|
||||||
<div className="settings-row danger" onClick={onClickLogout}>
|
<div className="settings-row danger" onClick={onClickPolicy}>
|
||||||
<div className="settings-row-title bd-style">{t('settings.logout')}</div>
|
<div className="settings-row-title bd-style">{t('settings.termsAndPrivacy')}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ marginTop: '10px', paddingBottom: '10px' }}>
|
<div className="settings-row danger" onClick={onClickLogout}>
|
||||||
<div
|
<div className="settings-row-title bd-style">{t('settings.logout')}</div>
|
||||||
onClick={onClickPrivacyPolicy}
|
|
||||||
style={{
|
|
||||||
cursor: 'pointer',
|
|
||||||
color: '#043465',
|
|
||||||
textDecoration: 'underline',
|
|
||||||
textAlign: 'center',
|
|
||||||
padding: '12px'
|
|
||||||
}}
|
|
||||||
>{t('settings.privacyPolicy')}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -452,6 +446,20 @@ export const SettingPage = () => {
|
|||||||
changeLanguage={ changeLanguage }
|
changeLanguage={ changeLanguage }
|
||||||
></ServiceLanguageBottomSheet>
|
></ServiceLanguageBottomSheet>
|
||||||
}
|
}
|
||||||
|
{ !!dialogOpen &&
|
||||||
|
<Dialog
|
||||||
|
open={dialogOpen}
|
||||||
|
onClose={() => setDialogOpen(false)}
|
||||||
|
message={t('settings.logoutConfirm')}
|
||||||
|
afterLeave={() => setDialogOpen(false)}
|
||||||
|
buttonLabel={[t('common.cancel'), t('common.confirm')]}
|
||||||
|
onConfirmClick={() => {
|
||||||
|
console.log(t('common.confirm'));
|
||||||
|
logout();
|
||||||
|
}}
|
||||||
|
onCancelClick={() => setDialogOpen(false)}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user