-
Notifications
You must be signed in to change notification settings - Fork 1
✨ feat: RegisterLayout 컴포넌트 구현 #118
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
Conversation
minimo-9
left a comment
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.
고생하셨습니다! 굿굿
| const TEXT_MAP = { | ||
| profile: { | ||
| header: '내 프로필', | ||
| content: '내 프로필을 등록하고 원하는 가게에 지원해 보세요.', | ||
| buttonText: '내 프로필 등록하기', | ||
| link: '/profile/edit', | ||
| }, | ||
| store: { | ||
| header: '내 가게', | ||
| content: '내 가게를 소개하고 공고도 등록해 보세요.', | ||
| buttonText: '가게 등록하기', | ||
| link: '/owner/store/edit', | ||
| }, | ||
| application: { | ||
| header: '신청 내역', | ||
| content: '아직 신청 내역이 없어요.', | ||
| buttonText: '공고 보러가기', | ||
| link: '/', | ||
| }, | ||
| notice: { | ||
| header: '등록한 공고', | ||
| content: '공고를 등록해 보세요.', | ||
| buttonText: '공고 등록하기', | ||
| link: '/owner/post', | ||
| }, | ||
| }; |
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.
💬 type에 따라 구분하는 방식이 아니라 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.
음 이미 다 정해져있는 텍스트들이고, 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.
일반적으로 컴포넌트는 확장성/범용성을 위해서 만든다고 생각해서.. 개인적으로 좋은 방식은? 아닌 거 같습니다
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.
말씀대로 확장성을 고려한다면 주영님 말씀이 맞지만, 지금 저희가 구현하는 페이지 내에서 사용되는 부분은 4개뿐이고, 사용처가 추가되거나 내용이 변할 가능성이 없다고 느끼기 때문에 현재는 이 방식이 좀 더 적합하다고 생각합니다.
추후에 확장 가능성이 있다면 prop으로 넘기는 방식도 괜찮을 것 같습니다.
📌 변경 사항 개요
내 프로필 상세 페이지와 가게 정보 상세 페이지에서 등록 전의 레이아웃이 겹치므로 해당 레이아웃을 분리했습니다.
📝 상세 내용
RegisterLayout 컴포넌트 제작
🔗 관련 이슈
🖼️ 스크린샷(선택사항)
profile: 가게 등록 전
store: 프로필 등록 전
application: 알바 지원 전
notice: 공고 올리기 전
💡 참고 사항
다만, 현재 모바일에서는 버튼의 size가 medium 이고 태블릿 이상부터는 버튼의 size가 large입니다.
화면의 크기에 따라 버튼의 size를 다르게 주려면 window.innerwidth를 사용해야 하는데, 이것보단 그냥 tailwind의 반응형 속성을 활용하는게 더 편할 것 같아서, size는 medium으로 두고, large 사이즈는 클래스로 구현했습니다.