-
Notifications
You must be signed in to change notification settings - Fork 47
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
경북대 FE_이효은_4주차 과제 Step2 #54
Open
Hyoeunkh
wants to merge
19
commits into
kakao-tech-campus-2nd-step2:hyoeunkh
Choose a base branch
from
Hyoeunkh:step2
base: hyoeunkh
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6346775
feat: chakra ui 설치 및 세팅
Hyoeunkh 3b1fd84
feat: ProductDetailPage 구현
Hyoeunkh d6f11b4
feat: DetailSection 구현
Hyoeunkh 810610f
feat: detail response type 지정
Hyoeunkh 84afd42
feat: item과 detail page 연결
Hyoeunkh 2afd9df
feat: OptionSection 구현
Hyoeunkh f6ae017
feat: useOrderHistory context API 구현
Hyoeunkh 9c858e1
feat: useProductDetail API 구현
Hyoeunkh e46fced
feat: orderHistoryProvider 세팅
Hyoeunkh 6855ae9
feat: OrderPage 구현
Hyoeunkh a5bcb62
feat: GiftMessageSection의 메세지 카드와 선물내역 구현
Hyoeunkh bd42efe
feat: PaymentSection의 현금영수증과 결제정보 구현
Hyoeunkh cf72269
docs: 2단계 README 작성
Hyoeunkh 7b1eee1
feat: ProductOption API 구현
Hyoeunkh 9736b0e
feat: giftOrderLimit을 초과한 경우 선택불가 구현
Hyoeunkh 0487d08
style: 불필요한 주석 삭제
Hyoeunkh f97786b
feat: message card ref 세팅
Hyoeunkh 255d031
feat: 현금영수증 ref 세팅 및 validation 구현
Hyoeunkh 6932893
Merge branch 'hyoeunkh' into step2
Hyoeunkh 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
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
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.
현재는 inputRef를 끌어올려서 부모에서 각 섹션으로 넘겨주는 형태인데요,
submit, 유효성 검사에 필요한 모든 정보를 부모로 끌어올려 관리하는 것은 어떨까요?
현금 영수증 정보까지 모두 부모에서 관리하면 각 섹션은 각자가 해야하는 일에 집중할 수 있게 됩니다.
GiftMessageSection는 메시지를 입력하고, 관련 ui를 보여줍니다.
PaymentSection는 현금 영수증 정보를 입력하고, 결제를 처리하고, 관련 ui를 보여줍니다. (현금 영수증과 결제를 분리해도 괜찮을 것 같네요. 결제는 부모에서, 현금 영수증은 별도의 섹션으로 관리)
이제 각 섹션은 자신이 입력하는 데이터가 유효한지는 생각하지 않아도 됩니다.
근데 이러면 부모쪽에 책임이 집중된다는 단점이 있어서 완전히 좋다고 하기는 좀 그러네요...
저라면 부모로 옮기는 방식과 contextAPI 사용을 고려해봤을 것 같아요.