diff --git a/src/components/LoginPage/SocialLoginBtn.jsx b/src/components/LoginPage/SocialLoginBtn.jsx index fa1a028..69580d4 100644 --- a/src/components/LoginPage/SocialLoginBtn.jsx +++ b/src/components/LoginPage/SocialLoginBtn.jsx @@ -2,9 +2,9 @@ import styled from 'styled-components'; import { ReactComponent as Kakao } from '../../assets/socialLogin/kakao.svg'; import { ReactComponent as Naver } from '../../assets/socialLogin/naver.svg'; -function SocialLoginBtn({ type }) { +function SocialLoginBtn({ type, onClick }) { return ( - + {type === 'kakao' && ( diff --git a/src/pages/LoginPage.jsx b/src/pages/LoginPage.jsx index e1fd9f3..66ca318 100644 --- a/src/pages/LoginPage.jsx +++ b/src/pages/LoginPage.jsx @@ -8,19 +8,32 @@ function LoginPage() { const onCancel = () => { navigate(-1); }; + const NAVER = process.env.REACT_APP_NAVER; + const KAKAO = process.env.REACT_APP_KAKAO; + + const routeToSocialLogin = (type) => { + const url = type === 'naver' ? NAVER : KAKAO; + window.location.href = url; + }; + return ( MoreView - + routeToSocialLogin('kakao')} + /> 또는 - + routeToSocialLogin('naver')} + /> ); } - export default LoginPage; const LoginContainer = styled.div` diff --git a/src/pages/ProjectPage.jsx b/src/pages/ProjectPage.jsx index 85cc099..adbd487 100644 --- a/src/pages/ProjectPage.jsx +++ b/src/pages/ProjectPage.jsx @@ -200,8 +200,9 @@ function ProjectPage() { ) : (