Skip to content

Commit 284ccb7

Browse files
committed
feat: main page UI #46
1 parent a3ed6cd commit 284ccb7

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { css } from '@emotion/react';
2+
3+
import { Theme } from '@/styles/Theme';
4+
5+
export const mainPageLayout = css`
6+
display: flex;
7+
flex-direction: column;
8+
justify-content: center;
9+
align-items: center;
10+
height: 100%;
11+
12+
background-color: ${Theme.color.peanut200};
13+
gap: 3rem;
14+
`;
15+
16+
export const logoWrapper = css`
17+
width: 16rem;
18+
height: 16rem;
19+
20+
background-color: white;
21+
`;
22+
23+
export const title = css`
24+
font-size: 4.8rem;
25+
`;
26+
27+
export const intro = css`
28+
color: ${Theme.color.gray400};
29+
font-size: 1.6rem;
30+
`;
+19-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
import React from 'react';
1+
import { useNavigate } from 'react-router-dom';
2+
3+
import { mainPageLayout, logoWrapper, title, intro } from './MainPage.styled';
4+
5+
import Button from '@/components/common/Button/Button';
26

37
const MainPage = () => {
4-
return <div>this is main page</div>;
8+
const navigate = useNavigate();
9+
10+
const goToNicknamePage = () => {
11+
navigate('/nickname');
12+
};
13+
14+
return (
15+
<div css={mainPageLayout}>
16+
<div css={logoWrapper}>LO to the GO</div>
17+
<h1 css={title}>땅콩</h1>
18+
<div css={intro}>어색한 분위기를 주도해봐요</div>
19+
<Button text="방 만들기" active={true} onClick={goToNicknamePage}></Button>
20+
</div>
21+
);
522
};
623

724
export default MainPage;

frontend/src/styles/GlobalStyle.ts

-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ const GlobalStyle = css`
143143
${reset}
144144
145145
html {
146-
margin-top: 3rem;
147146
font-size: 10px;
148147
}
149148

0 commit comments

Comments
 (0)