로컬라이제이션 적용 (영어 / 한국어 )

This commit is contained in:
HyeongBaeYang committed 2026-02-10 14:39:58 +09:00
1 parent 29fdb7e65c
commit ad6f9e09a1
30 files changed
+1474 -309

No files matched your search

+6 -4
View File
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { getKakaoLoginUrl, kakaoCallback } from '../../utils/api';
interface LoginSectionProps {
@@ -8,6 +9,7 @@ interface LoginSectionProps {
}
const LoginSection: React.FC<LoginSectionProps> = ({ onBack, onLogin }) => {
const { t } = useTranslation();
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
@@ -37,7 +39,7 @@ const LoginSection: React.FC<LoginSectionProps> = ({ onBack, onLogin }) => {
onLogin();
} catch (err) {
console.error('Kakao callback failed:', err);
setError('카카오 로그인에 실패했습니다. 다시 시도해주세요.');
setError(t('login.kakaoLoginFailed'));
// URL에서 code 파라미터 제거
const url = new URL(window.location.href);
@@ -59,7 +61,7 @@ const LoginSection: React.FC<LoginSectionProps> = ({ onBack, onLogin }) => {
window.location.href = response.auth_url;
} catch (err) {
console.error('Failed to get Kakao login URL:', err);
setError('로그인 URL을 가져오는데 실패했습니다. 다시 시도해주세요.');
setError(t('login.loginUrlFailed'));
setIsLoading(false);
}
};
@@ -69,7 +71,7 @@ const LoginSection: React.FC<LoginSectionProps> = ({ onBack, onLogin }) => {
{/* Back Button */}
<button onClick={onBack} className="login-back-btn" disabled={isLoading}>
<img src="/assets/images/icon-back.svg" alt="Back" />
<span>뒤로가기</span>
<span>{t('login.back')}</span>
</button>
<div className="login-content">
@@ -91,7 +93,7 @@ const LoginSection: React.FC<LoginSectionProps> = ({ onBack, onLogin }) => {
className="btn-kakao"
disabled={isLoading}
>
{isLoading ? '로그인 중...' : '카카오로 시작하기'}
{isLoading ? t('login.loggingIn') : t('login.kakaoStart')}
</button>
</div>
</div>