Skip to content

Commit

Permalink
어드민 로그인 및 회원가입 완료 UI 구현 (#11)
Browse files Browse the repository at this point in the history
* chore: theme 설정 추가

* feat: 로그인 페이지 UI 구현

- react-router 패키지 설정
- the-new-css-reset 패키지 설정

* feat: 회원가입 완료 UI 구현

* feat: path 상수화
  • Loading branch information
Puterism authored Jan 25, 2024
1 parent c975959 commit 6077548
Show file tree
Hide file tree
Showing 21 changed files with 573 additions and 16 deletions.
71 changes: 71 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .yarn/install-state.gz
Binary file not shown.
24 changes: 13 additions & 11 deletions apps/admin/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<html lang="ko">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>불티</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
4 changes: 3 additions & 1 deletion apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.3",
"the-new-css-reset": "^1.11.2"
},
"devDependencies": {
"@boolti/eslint-config": "*",
Expand Down
1 change: 0 additions & 1 deletion apps/admin/public/vite.svg

This file was deleted.

31 changes: 30 additions & 1 deletion apps/admin/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
import { QueryClientProvider } from '@boolti/api';
import { createBrowserRouter, RouterProvider, Navigate } from 'react-router-dom';
import ThemeProvider from './styles/ThemeProvider';
import LoginPage from './pages/Login/LoginPage';
import SignUpCompletePage from './pages/SignUpComplete/SignUpCompletePage';
import 'the-new-css-reset/css/reset.css';
import './index.css';
import { PATH } from './constants/routes';

const router = createBrowserRouter([
{
path: PATH.INDEX,
element: <Navigate to={PATH.LOGIN} replace />, // Note: 이후 랜딩 페이지로 교체 필요
},
{
path: PATH.LOGIN,
element: <LoginPage />,
},
{
path: PATH.SIGNUP_COMPLETE,
element: <SignUpCompletePage />,
},
{ path: PATH.HOME, element: <></> },
{
path: '*',
element: <Navigate to={PATH.INDEX} replace />,
},
]);

const App = () => {
// const { data } = useHelloQuery();
// console.log(data?.hello)
return (
<QueryClientProvider>
<h1>Hello World</h1>
<ThemeProvider>
<RouterProvider router={router} />
</ThemeProvider>
</QueryClientProvider>
);
};
Expand Down
3 changes: 3 additions & 0 deletions apps/admin/src/assets/svg/apple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/admin/src/assets/svg/kakao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/admin/src/constants/routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const PATH = {
INDEX: '/',
LOGIN: '/login',
SIGNUP_COMPLETE: '/signup/complete',
HOME: '/home',
};
5 changes: 5 additions & 0 deletions apps/admin/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import url("https://cdnjs.cloudflare.com/ajax/libs/pretendard/1.3.9/static/pretendard-dynamic-subset.min.css");

* {
font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}
2 changes: 1 addition & 1 deletion apps/admin/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import App from './App';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
Expand Down
119 changes: 119 additions & 0 deletions apps/admin/src/pages/Login/LoginPage.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import styled from '@emotion/styled';
import { Link } from 'react-router-dom';

const LoginPage = styled.div`
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: ${({ theme }) => theme.palette.grey.g20};
`;

const LoginContent = styled.div``;

const Card = styled.div`
width: 600px;
background-color: ${({ theme }) => theme.palette.grey.w};
box-shadow: 0px 8px 14px 0px #8b8b8b26;
margin-bottom: 40px;
border-radius: 8px;
`;

const CardHeader = styled.div`
height: 64px;
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1px solid ${({ theme }) => theme.palette.grey.g20};
`;

const CardHeaderTitle = styled.h2`
${({ theme }) => theme.typo.h2_m};
color: ${({ theme }) => theme.palette.grey.g70};
`;

const CardContent = styled.div`
padding-top: 60px;
padding-bottom: 40px;
display: flex;
flex-direction: column;
align-items: center;
`;

const CardContentTitle = styled.h3`
${({ theme }) => theme.typo.h3};
color: ${({ theme }) => theme.palette.grey.g90};
text-align: center;
margin-bottom: 48px;
`;

const LoginButtonContainer = styled.div`
width: 388px;
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 80px;
`;

const LoginButtonIcon = styled.div`
position: absolute;
left: 24px;
display: inline-flex;
align-items: center;
`;

const KakaoLoginButton = styled.button`
${({ theme }) => theme.typo.sh1};
color: ${({ theme }) => theme.palette.grey.g100};
background-color: #ffe833;
height: 48px;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
cursor: pointer;
`;

const AppleLoginButton = styled.button`
${({ theme }) => theme.typo.sh1};
color: ${({ theme }) => theme.palette.grey.w};
background-color: ${({ theme }) => theme.palette.grey.g100};
height: 48px;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
cursor: pointer;
`;

const BottomLinkContainer = styled.div`
${({ theme }) => theme.typo.b3};
color: ${({ theme }) => theme.palette.grey.g70};
display: flex;
flex-direction: column;
gap: 8px;
text-align: center;
`;

const BottomLink = styled(Link)`
cursor: pointer;
`;

export default {
LoginPage,
LoginContent,
Card,
CardHeader,
CardHeaderTitle,
CardContent,
CardContentTitle,
LoginButtonContainer,
LoginButtonIcon,
KakaoLoginButton,
AppleLoginButton,
BottomLinkContainer,
BottomLink,
};
58 changes: 58 additions & 0 deletions apps/admin/src/pages/Login/LoginPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import Styled from './LoginPage.styles';
import kakaoIconUrl from '../../assets/svg/kakao.svg';
import appleIconUrl from '../../assets/svg/apple.svg';
import { useNavigate } from 'react-router-dom';

const LoginPage = () => {
const navigate = useNavigate();

return (
<Styled.LoginPage>
<Styled.LoginContent>
<Styled.Card>
<Styled.CardHeader>
<Styled.CardHeaderTitle>로그인</Styled.CardHeaderTitle>
</Styled.CardHeader>
<Styled.CardContent>
<Styled.CardContentTitle>
지금 불티에서
<br />
티켓을 불티나게 팔아보세요!
</Styled.CardContentTitle>
<Styled.LoginButtonContainer>
<Styled.KakaoLoginButton
onClick={() => {
navigate('/signup/complete');
}}
>
<Styled.LoginButtonIcon>
<img src={kakaoIconUrl} alt="카카오톡" />
</Styled.LoginButtonIcon>
카카오톡으로 시작하기
</Styled.KakaoLoginButton>
<Styled.AppleLoginButton
onClick={() => {
navigate('/signup/complete');
}}
>
<Styled.LoginButtonIcon>
<img src={appleIconUrl} alt="Apple" />
</Styled.LoginButtonIcon>
Apple로 시작하기
</Styled.AppleLoginButton>
</Styled.LoginButtonContainer>
<Styled.BottomLinkContainer>
{/* Note: 추후 실제 링크로 교체 */}
<Styled.BottomLink to="https://naver.com">개인정보 처리방침</Styled.BottomLink>
<Styled.BottomLink to="https://naver.com">서비스 이용약관</Styled.BottomLink>
</Styled.BottomLinkContainer>
</Styled.CardContent>
</Styled.Card>
{/* Note: 추후 로고로 교체 */}
<p style={{ textAlign: 'center' }}>Boolti logo</p>
</Styled.LoginContent>
</Styled.LoginPage>
);
};

export default LoginPage;
Loading

0 comments on commit 6077548

Please sign in to comment.