Skip to content

Commit

Permalink
Merge pull request #55 from modern-agile-team/publish/#54/login_page
Browse files Browse the repository at this point in the history
로그인(Oauth) 페이지 레이아웃 완성
  • Loading branch information
rhehfl authored Oct 22, 2024
2 parents 783106d + 60c5b62 commit 6dab4af
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/pages/login/Login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { AlignCenter } from '../../style/LayOut';
import { FlexContainer, LogoImageSection, SocialLoginLink } from './styles';

export default function Login() {
const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${
import.meta.env.VITE_KAKAO_REST_API_KEY
}&redirect_uri=${import.meta.env.VITE_KAKAO_REDIRECT_URL}&response_type=code`;
return (
<>
<AlignCenter>
<FlexContainer>
<LogoImageSection />
<SocialLoginLink to={kakaoURL}>카카오</SocialLoginLink>
<SocialLoginLink to="">구글</SocialLoginLink>
<SocialLoginLink to="">깃허브</SocialLoginLink>
</FlexContainer>
</AlignCenter>
</>
);
}
26 changes: 26 additions & 0 deletions src/pages/login/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Link } from 'react-router-dom';
import styled from 'styled-components';
export const FlexContainer = styled.section`
width: 1280px;
display: flex;
flex-direction: column;
align-items: center;
`;
export const LogoImageSection = styled.section`
margin: 163px 0px 70px 0px;
width: 372px;
height: 82px;
border: 2px dashed #f00;
background: #efeff0;
`;
export const SocialLoginLink = styled(Link)`
display: block;
margin-bottom: 45px;
width: 412px;
height: 50px;
color: black;
text-decoration: none; // 밑줄 없애기
border-radius: 4px;
border: 2px solid #000;
background: #fff;
`;
2 changes: 2 additions & 0 deletions src/route/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Ranking from '../pages/Ranking/Ranking';
import Quiz from '../pages/Quiz/Quiz';
import Admin from '../admin/Admin';
import CreateQuiz from '../admin/CreateQuiz';
import Login from '../pages/login/login';
export default function Router() {
return (
<>
Expand All @@ -14,6 +15,7 @@ export default function Router() {
<Route path="/quest" element={<Quest />}></Route>
<Route path="/ranking" element={<Ranking />}></Route>
<Route path="/quiz/:section/:part" element={<Quiz />}></Route>
<Route path="/login" element={<Login />}></Route>
{/*어드민 페이지 부분 문제조회/추가 이외에 규모 확장 시 레포 분리 */}
<Route path="/admin" element={<Admin />} />
<Route path="/admin/create-quiz" element={<CreateQuiz />}></Route>
Expand Down

0 comments on commit 6dab4af

Please sign in to comment.