-
Notifications
You must be signed in to change notification settings - Fork 14
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
[조형민] sprint6 #42
base: react-조형민
Are you sure you want to change the base?
The head ref may contain hidden characters: "react-\uC870\uD615\uBBFC-sprint6"
[조형민] sprint6 #42
Conversation
… '등록 버튼'의 활성화 조건도 유효성 체크와 연동하여 변경
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.
형민님 fe도 고생많으셨습니다.
여러 고민들이 보여서 좋네요!
몇개 코멘트 작성해놧으니 보시고 이해 안가시면 말씀해주세요!
수고하셨습니다~
@@ -0,0 +1 @@ | |||
16.20.2 |
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.
현재 lts 버전이 22인데, 16 버전을 쓰는 이유가 있으실까요??
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.
어떤 에러가 나서 찾아보니 버전 관련 에러라고 해서..버전을 저렇게 낮췄더니 작동을 하길래 일단 해버렸습니닷… 😳
))} | ||
</div> | ||
); | ||
// const MENU_TEXT = ['최신순', '좋아요순']; |
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.
요 주석은 삭제해야할것 같습니다~
}; | ||
|
||
/** | ||
* 포커스 아웃시 onBlur가 호출되었을 때 blur이벤트로 드롭다운 메뉴가 클릭되지 않는 문제 발생 |
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.
이런 좋습니다 👍
: `좋아요순 ${isDropdownView ? '▲' : '▼'}`; | ||
|
||
const handleButtonClick = () => { | ||
setDropdownView(!isDropdownView); |
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.
이거는 아래와같이 변경할수 있을것 같아요
setDropdownView((v) => !v)
onBlur={handleNameBlur} | ||
placeholder="상품명을 입력해주세요" | ||
/> | ||
{!isValidName && <div className="error-message">1자 이상 10자 이내로 입력해 주세요.</div>} |
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.
요런거 관련해서 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key에 index인 i를 넣는거는 좋지 않아서 tag를 넣거나 tag-${i}
요렇게 넣는것도 좋을것 같아요~
<div> | ||
<Header /> | ||
<main> | ||
<RegistrationForm /> |
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.
form으로 빼신것 좋습니다 ㅎㅎ 현업에서도 form은 따로 빼서 작업 많이합니다!
@@ -0,0 +1,11 @@ | |||
import { useMediaQuery } from "react-responsive"; | |||
|
|||
export default function useDeviceSize() { |
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.
깔끔한 훅이네요 👍
@@ -0,0 +1,45 @@ | |||
import { useState } from "react"; | |||
|
|||
function useCheckInputValid(validation) { |
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.
이런 커스텀 훅 시도 좋습니다 👍 위에서 얘기드린대로 react-hook-form을 쓰면 이런게 지원되는데,
이렇게 하나하나 구현해보는것은 좋습니다 ㅎㅎ
요구사항
기본 요구사항
공통
프론트엔드 구현 요구사항
랜딩 페이지
중고마켓 페이지
상품 등록 페이지
심화 요구사항
프론트엔드 구현 요구사항
상품 등록 페이지
주요 변경사항
스크린샷
멘토에게