-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] 게임화면 및 대기화면 기능 구현 #54
Changes from all commits
c382eb8
c179f82
a3ed6cd
284ccb7
f595781
8febc71
f2f1669
5dd6366
937783d
936ecaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { layout } from './Timer.styled'; | ||
import { timerLayout } from './Timer.styled'; | ||
|
||
const Timer = () => { | ||
return <div css={layout}></div>; | ||
return <div css={timerLayout}></div>; | ||
}; | ||
|
||
export default Timer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import { contentSection } from './Content.styled'; | ||
import { contentLayout } from './Content.styled'; | ||
|
||
const Content = ({ children }: PropsWithChildren) => { | ||
return <section css={contentSection}>{children}</section>; | ||
return <section css={contentLayout}>{children}</section>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. L5 - 참고 의견layout 명 고치느라 고생많았네요!!! 컨벤션 지키려고 노력하는 거 아주 좋습니당 |
||
}; | ||
|
||
export default Content; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { Theme } from '@/styles/Theme'; | ||
|
||
export const mainPageLayout = css` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
|
||
background-color: ${Theme.color.peanut200}; | ||
gap: 3rem; | ||
`; | ||
|
||
export const logoWrapper = css` | ||
width: 16rem; | ||
height: 16rem; | ||
|
||
background-color: white; | ||
`; | ||
|
||
export const title = css` | ||
font-size: 4.8rem; | ||
`; | ||
|
||
export const intro = css` | ||
color: ${Theme.color.gray400}; | ||
font-size: 1.6rem; | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
import { mainPageLayout, logoWrapper, title, intro } from './MainPage.styled'; | ||
|
||
import Button from '@/components/common/Button/Button'; | ||
|
||
const MainPage = () => { | ||
const navigate = useNavigate(); | ||
|
||
const goToNicknamePage = () => { | ||
navigate('/nickname'); | ||
}; | ||
|
||
return ( | ||
<div css={mainPageLayout}> | ||
<div css={logoWrapper}>LO to the GO</div> | ||
<h1 css={title}>땅콩</h1> | ||
<h2 css={intro}>어색한 분위기를 주도해봐요</h2> | ||
<Button text="방 만들기" active={true} onClick={goToNicknamePage}></Button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MainPage; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { Theme } from '@/styles/Theme'; | ||
|
||
export const profile = css` | ||
width: 8rem; | ||
height: 8rem; | ||
margin-top: 4rem; | ||
|
||
background-color: ${Theme.color.gray300}; | ||
border-radius: 50%; | ||
`; | ||
|
||
export const nickname = css` | ||
width: 26.8rem; | ||
margin: 2rem 0; | ||
|
||
font-weight: 600; | ||
font-size: 1.6rem; | ||
`; | ||
|
||
export const nicknameInputWrapper = css` | ||
display: flex; | ||
align-items: center; | ||
width: 26.8rem; | ||
height: 4.8rem; | ||
padding: 0 1rem; | ||
|
||
background-color: ${Theme.color.gray200}; | ||
border-radius: 1rem; | ||
`; | ||
|
||
export const nicknameInput = css` | ||
width: 100%; | ||
border: 0; | ||
|
||
background-color: ${Theme.color.gray200}; | ||
outline: none; | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { profile, nickname, nicknameInputWrapper, nicknameInput } from './NicknamePage.styled'; | ||
|
||
import Content from '@/components/layout/Content/Content'; | ||
import { createRandomNickname } from '@/utils/nickname'; | ||
|
||
const NicknamePage = () => { | ||
const randomNickname = createRandomNickname(); | ||
|
||
return ( | ||
<Content> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. L5 - 참고 의견알아서 찰떡 같이 공통 Content layout 잘 적용하신 모습을 보니 뿌듯하네요 ✨ |
||
<div css={profile}></div> | ||
<div css={nickname}>닉네임</div> | ||
<div css={nicknameInputWrapper}> | ||
<input css={nicknameInput} type="text" placeholder={randomNickname} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. L4 - 변경 제안저희 근데 어차피 지금은 닉네임을 변경할 수 없으니 placeholder로 안 하고 value에 넣어도 되지 않을까 하는 생각도 있는데, 어떻게 생각하시나요 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. value랑 placeholder 둘 다 변경이 가능해서 기능 상의 차이는 없지 않을까 생각합니다! |
||
</div> | ||
</Content> | ||
); | ||
}; | ||
|
||
export default NicknamePage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L5 - 참고 의견
저도 수정하면서 좀 고민이 되었는데 버튼 내의 텍스트는 그냥 string으로 열어둬도 괜찮을 것 같긴 하네용