인디케이터 추가 및 css코드 분리
This commit is contained in:
1 parent
429c8d4708
commit
888ac4fa5e
45 files changed
+13009
-14040
No files matched your search
@@ -1,9 +1,11 @@
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const API_URL = import.meta.env.VITE_API_URL || 'http://40.82.133.44';
|
||||
|
||||
const YouTubeOAuthCallback: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
const [status, setStatus] = useState<'processing' | 'error'>('processing');
|
||||
const [errorMessage, setErrorMessage] = useState<string>('');
|
||||
|
||||
@@ -18,7 +20,7 @@ const YouTubeOAuthCallback: React.FC = () => {
|
||||
if (error) {
|
||||
console.error('[YouTube OAuth] Error from Google:', error);
|
||||
setStatus('error');
|
||||
setErrorMessage('Google 인증이 취소되었거나 실패했습니다.');
|
||||
setErrorMessage(t('social.youtubeCallback.errorAuthCancelled'));
|
||||
setTimeout(() => {
|
||||
window.location.href = '/social/connect/error?platform=youtube&error=' + encodeURIComponent(error);
|
||||
}, 1500);
|
||||
@@ -28,7 +30,7 @@ const YouTubeOAuthCallback: React.FC = () => {
|
||||
if (!code) {
|
||||
console.error('[YouTube OAuth] No code received');
|
||||
setStatus('error');
|
||||
setErrorMessage('인증 코드를 받지 못했습니다.');
|
||||
setErrorMessage(t('social.youtubeCallback.errorNoCode'));
|
||||
setTimeout(() => {
|
||||
window.location.href = '/social/connect/error?platform=youtube&error=no_code';
|
||||
}, 1500);
|
||||
@@ -46,7 +48,7 @@ const YouTubeOAuthCallback: React.FC = () => {
|
||||
} catch (err) {
|
||||
console.error('[YouTube OAuth] Failed to process callback:', err);
|
||||
setStatus('error');
|
||||
setErrorMessage('YouTube 연결 처리 중 오류가 발생했습니다.');
|
||||
setErrorMessage(t('social.youtubeCallback.errorProcessing'));
|
||||
setTimeout(() => {
|
||||
window.location.href = '/social/connect/error?platform=youtube&error=processing_failed';
|
||||
}, 1500);
|
||||
@@ -66,8 +68,8 @@ const YouTubeOAuthCallback: React.FC = () => {
|
||||
<circle cx="25" cy="25" r="20" fill="none" strokeWidth="4" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 className="social-connect-title">YouTube 연결 중...</h1>
|
||||
<p className="social-connect-message">잠시만 기다려주세요.</p>
|
||||
<h1 className="social-connect-title">{t('social.youtubeCallback.connecting')}</h1>
|
||||
<p className="social-connect-message">{t('social.youtubeCallback.pleaseWait')}</p>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@@ -78,7 +80,7 @@ const YouTubeOAuthCallback: React.FC = () => {
|
||||
<line x1="9" y1="9" x2="15" y2="15" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 className="social-connect-title">연결 실패</h1>
|
||||
<h1 className="social-connect-title">{t('social.youtubeCallback.failed')}</h1>
|
||||
<p className="social-connect-message">{errorMessage}</p>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user