Skip to content

Commit

Permalink
[Fix]소셜 로그인 기능 롤백
Browse files Browse the repository at this point in the history
소셜 로그인 성공시 로그인 확인 모달창을 거치지 않고, 한번 더 로그인 버튼을 눌러야 로그인완료되도록 롤백
Issues #15
  • Loading branch information
김병현 authored and 김병현 committed Sep 16, 2023
1 parent aa35233 commit f8fc83c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions client/src/components/Logins/LoginConfirmatationModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import styled from 'styled-components';
import TokenHandler from './TokenHandler';

const LoginConfirmationModal: React.FC<LoginConfirmationProps> = ({ onClose }) => {
const messageText = "로그인이 성공적으로 완료되었습니다!";
Expand All @@ -9,7 +8,6 @@ const LoginConfirmationModal: React.FC<LoginConfirmationProps> = ({ onClose }) =
return (
<ModalBackground>
<ModalContainer>
<TokenHandler />
<Message>{messageText}</Message>
<ConfirmButton onClick={onClose}>{confirmText}</ConfirmButton>
</ModalContainer>
Expand Down
7 changes: 2 additions & 5 deletions client/src/components/Logins/OAuthLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import GoogleLoginButton from './GoogleLoginButton';
import KakaoLoginButton from './KakaoLoginButton';
import { useSelector } from 'react-redux';
import { RootState } from '../../store/config';

import TokenHandler from './TokenHandler';

const OAuthLoginModal: React.FC<LoginModalProps> = ({ onClose, onEmailLoginClick, onEmailSignupClick, onLoginSuccess }) => {
const titleText = "로그인";
Expand All @@ -14,9 +14,6 @@ const OAuthLoginModal: React.FC<LoginModalProps> = ({ onClose, onEmailLoginClick

const loginState = useSelector((state: RootState) => state.login);




useEffect(() => {
if (loginState === 1) {
onLoginSuccess();
Expand All @@ -27,7 +24,7 @@ const OAuthLoginModal: React.FC<LoginModalProps> = ({ onClose, onEmailLoginClick
return (
<ModalBackground>
<ModalContainer>

<TokenHandler />
<CloseButton onClick={onClose}>&times;</CloseButton>
<Title>{titleText}</Title>
<GoogleLoginButton backendURL="http://ec2-13-125-246-160.ap-northeast-2.compute.amazonaws.com:8080/oauth2/authorization/google" />
Expand Down

0 comments on commit f8fc83c

Please sign in to comment.