Skip to content

Commit

Permalink
Merge pull request #29 from TUK-MoreView/feat/login-page
Browse files Browse the repository at this point in the history
feat: ์†Œ์…œ ๋กœ๊ทธ์ธ Link ์ถ”๊ฐ€
  • Loading branch information
play3step authored Mar 13, 2024
2 parents f77e3e2 + ad8fd04 commit 54d5e28
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/LoginPage/SocialLoginBtn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<SocialLoginBtnContainer>
<SocialLoginBtnContainer onClick={onClick}>
{type === 'kakao' && (
<TextContainer>
<Kakao alt="์นด์นด์˜ค" width="1.40625vw" height="2.5vh" />
Expand Down
19 changes: 16 additions & 3 deletions src/pages/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<LoginContainer>
<BackPosition>
<CloseBtn onClose={onCancel} />
</BackPosition>
<LogoStyle>MoreView</LogoStyle>
<SocialLoginBtn type="kakao" />
<SocialLoginBtn
type="kakao"
onClick={() => routeToSocialLogin('kakao')}
/>
<Despite>๋˜๋Š”</Despite>
<SocialLoginBtn type="naver" />
<SocialLoginBtn
type="naver"
onClick={() => routeToSocialLogin('naver')}
/>
</LoginContainer>
);
}

export default LoginPage;

const LoginContainer = styled.div`
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ProjectPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ function ProjectPage() {
) : (
<Canvas
key={page.id}
gl={{ alpha: true }}
style={{
backgroundColor: '#D9D9D9',
// backgroundColor: '#D9D9D9',
width: '83.33333333333334vw',
height: '83.33333333333334vh',
}}
Expand Down

0 comments on commit 54d5e28

Please sign in to comment.