-
Notifications
You must be signed in to change notification settings - Fork 3
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: 커피챗 업로드 뷰 데스크탑, 모바일 레이아웃 구현 #1599
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/components/coffeechat/page/layout/DesktopCoffeechatUploadLayout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import styled from '@emotion/styled'; | ||
import { ReactNode } from 'react'; | ||
|
||
interface DesktopCoffeechatUploadLayoutProps { | ||
main: ReactNode; | ||
aside: ReactNode; | ||
submitButton: ReactNode; | ||
} | ||
|
||
export default function DesktopCoffeechatUploadLayout({ | ||
main, | ||
aside, | ||
submitButton, | ||
}: DesktopCoffeechatUploadLayoutProps) { | ||
return ( | ||
<Layout> | ||
<Main> | ||
<Body>{main}</Body> | ||
<Footer>{submitButton}</Footer> | ||
</Main> | ||
<Aside>{aside}</Aside> | ||
</Layout> | ||
); | ||
} | ||
|
||
const Footer = styled.footer` | ||
margin: 62px 0 50px; | ||
`; | ||
|
||
const Layout = styled.div` | ||
display: flex; | ||
gap: 30px; | ||
justify-content: center; | ||
margin: 0 30px; | ||
`; | ||
|
||
const Body = styled.section` | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
const Main = styled.main` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-end; | ||
margin: 0 40px; | ||
`; | ||
|
||
const Aside = styled.aside``; |
27 changes: 27 additions & 0 deletions
27
src/components/coffeechat/page/layout/MobileCoffeechatUploadLayout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import styled from '@emotion/styled'; | ||
import { ReactNode } from 'react'; | ||
|
||
interface MobileCoffeechatUploadLayoutProps { | ||
main: ReactNode; | ||
submitButton: ReactNode; | ||
} | ||
|
||
export default function MobileCoffeechatUploadLayout({ main, submitButton }: MobileCoffeechatUploadLayoutProps) { | ||
return ( | ||
<Layout> | ||
<>{main}</> | ||
<Footer>{submitButton}</Footer> | ||
</Layout> | ||
); | ||
} | ||
|
||
const Layout = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
margin: 0 20px; | ||
`; | ||
|
||
const Footer = styled.footer` | ||
margin: 40px 0 56px; | ||
width: 100%; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. 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. 어머나!!! 정말 감사합니다!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import AuthRequired from '@/components/auth/AuthRequired'; | ||
import CoffeechatUploadPage from '@/components/coffeechat/page/CoffeechatUploadPage'; | ||
import { setLayout } from '@/utils/layout'; | ||
|
||
const CoffeechatUpload = () => { | ||
const defaultForm = { | ||
memberInfo: { | ||
career: '주니어', | ||
introduction: '안녕하세요! 저는 프론트엔드 개발자로 다양한 프로젝트 경험을 쌓고 있습니다.', | ||
}, | ||
coffeeChatInfo: { | ||
sections: ['프론트엔드', '디자인'], // 다중 선택 가능 (전체, 기획, 디자인, 웹, 서버, 안드로이드, iOS) | ||
bio: '프론트엔드 커리어 상담', | ||
topicTypes: ['커리어', '포트폴리오'], // 창업, 네트워킹, 프로젝트, 커리어 등 다중 선택 가능 | ||
topic: '프론트엔드 개발자로서의 커리어에 대해 상담하고 싶습니다.\n포트폴리오 제작과 인터뷰 팁도 나누고자 합니다.', | ||
meetingType: '온라인', // 무관, 온라인, 오프라인 중 하나 선택 | ||
guideline: '시간 약속을 꼭 지켜주세요.\n질문은 미리 준비해 오시면 더욱 좋습니다.', | ||
}, | ||
}; | ||
|
||
return ( | ||
<AuthRequired> | ||
<CoffeechatUploadPage uploadType='오픈' form={defaultForm} onSubmit={() => console.log('클릭')} /> | ||
</AuthRequired> | ||
); | ||
}; | ||
|
||
setLayout(CoffeechatUpload, 'header'); | ||
|
||
export default CoffeechatUpload; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Q
:이런식으로 바로 넣어주는 방법도 있을 것 같은데 main, submitButton, aside를 prop으로 넘겨서 삽입한 이유가 궁금해요!!
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.
이것은 취향의 차이일 것 같긴 한데용! 데스크탑이랑 모바일이랑 progress box의 유무로 인해 보여지는 레이아웃이 다르다보니 한 번 분기 처리를 해주었습니다! 또한 1260, 768, 430 bp에 따라 마진값이 다른 스타일을 넘겨주어야했다보니(이건 뒷 pr에 추가했습니닷) 데탑/모바일 레이아웃 컴포넌트를 따로 만들면 좀 더 간결해보일 것 같아서 나누어보았어요!