[조형민] sprint6#42
Open
paengdal wants to merge 47 commits intocodeit-sprint-fullstack:react-조형민from
Hidden character warning
The head ref may contain hidden characters: "react-\uc870\ud615\ubbfc-sprint6"
Open
Conversation
… '등록 버튼'의 활성화 조건도 유효성 체크와 연동하여 변경
seobew
approved these changes
Dec 10, 2024
seobew
left a comment
There was a problem hiding this comment.
형민님 fe도 고생많으셨습니다.
여러 고민들이 보여서 좋네요!
몇개 코멘트 작성해놧으니 보시고 이해 안가시면 말씀해주세요!
수고하셨습니다~
| @@ -0,0 +1 @@ | |||
| 16.20.2 | |||
Collaborator
Author
There was a problem hiding this comment.
어떤 에러가 나서 찾아보니 버전 관련 에러라고 해서..버전을 저렇게 낮췄더니 작동을 하길래 일단 해버렸습니닷… 😳
| ))} | ||
| </div> | ||
| ); | ||
| // const MENU_TEXT = ['최신순', '좋아요순']; |
| }; | ||
|
|
||
| /** | ||
| * 포커스 아웃시 onBlur가 호출되었을 때 blur이벤트로 드롭다운 메뉴가 클릭되지 않는 문제 발생 |
| : `좋아요순 ${isDropdownView ? '▲' : '▼'}`; | ||
|
|
||
| const handleButtonClick = () => { | ||
| setDropdownView(!isDropdownView); |
There was a problem hiding this comment.
이거는 아래와같이 변경할수 있을것 같아요
setDropdownView((v) => !v)| onBlur={handleNameBlur} | ||
| placeholder="상품명을 입력해주세요" | ||
| /> | ||
| {!isValidName && <div className="error-message">1자 이상 10자 이내로 입력해 주세요.</div>} |
There was a problem hiding this comment.
요런거 관련해서 react-hook-form 같은걸 써볼수 있습니다.
시간나실때 한번 보시면 좋습니다~
https://react-hook-form.com/
| /> | ||
| {!isValidTag && <div className="error-message">5글자 이내로 입력해 주세요.</div>} | ||
| {tags.map((tag, i) => { | ||
| return <TagChip value={tag} key={i} onClick={handleChipClick} chipIdx={i} />; |
There was a problem hiding this comment.
key에 index인 i를 넣는거는 좋지 않아서 tag를 넣거나 tag-${i}요렇게 넣는것도 좋을것 같아요~
| <div> | ||
| <Header /> | ||
| <main> | ||
| <RegistrationForm /> |
There was a problem hiding this comment.
form으로 빼신것 좋습니다 ㅎㅎ 현업에서도 form은 따로 빼서 작업 많이합니다!
| @@ -0,0 +1,11 @@ | |||
| import { useMediaQuery } from "react-responsive"; | |||
|
|
|||
| export default function useDeviceSize() { | |||
| @@ -0,0 +1,45 @@ | |||
| import { useState } from "react"; | |||
|
|
|||
| function useCheckInputValid(validation) { | |||
There was a problem hiding this comment.
이런 커스텀 훅 시도 좋습니다 👍 위에서 얘기드린대로 react-hook-form을 쓰면 이런게 지원되는데,
이렇게 하나하나 구현해보는것은 좋습니다 ㅎㅎ
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
요구사항
기본 요구사항
공통
프론트엔드 구현 요구사항
랜딩 페이지
중고마켓 페이지
상품 등록 페이지
심화 요구사항
프론트엔드 구현 요구사항
상품 등록 페이지
주요 변경사항
스크린샷
멘토에게