-
Notifications
You must be signed in to change notification settings - Fork 34
[최권진] sprint6 #126
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
The head ref may contain hidden characters: "React-\uCD5C\uAD8C\uC9C4"
[최권진] sprint6 #126
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.
권진님 최근 급격한 성장과 열정이 느껴집니다..! 앞으로도 화이팅입니다!!
+버셀 에러 관련 커밋이 많던데, 실제로 배포하지 않고 로컬에서 npm run build를 해보시면 많은 부분을 해결하실 수 있습니다!
<div className="mb-[24px]"> | ||
<label | ||
htmlFor={id} | ||
className="font-[700] text-[18px] text-[#1F2937] block mb-[8px]" |
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.
또한 기본적인 디자인 토큰은 tailwind config에 넣어서 쓰시는 것이 좋습니다~!
}; | ||
reader.readAsDataURL(file); | ||
} | ||
e.target.value = ""; |
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.
해당 부분은 이미지를 지우거나, 제출을 완료할 때 들어가야 됩니다~! 지금은 previewUrl만 남고 실제 제출할 데이터는 남지 않게 되네요 🤣
if (e.key === "Enter") { | ||
e.preventDefault(); | ||
const trimmed = tagInput.trim(); | ||
if (trimmed && !tags.includes(trimmed)) { |
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.
중복을 걸러낼 때 Set을 써보셔도 좋아요~! :)
</label> | ||
)} | ||
<div className="relative"> | ||
{type === "textarea" ? ( |
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은 input이 가지고 있는 고유 html 속성이죠..! 커스텀하여 props로 쓰기에는 부적절합니다.
function A({ as }) {
const Component = as;
return <Component />
}
<A as='textarea' />
이런 식으로 쓰실 수 있어요!
...rest | ||
}) => { | ||
return ( | ||
<div className={`${hidden ? "hidden" : "mb-[24px]"}`}> |
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> | ||
{error && !hidden && ( | ||
<p className="text-red-500 text-sm mt-[4px] ml-[16px]">{error}</p> |
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 currentPage = Number(searchParams.get("page")) || 1; | ||
const searchKeyword = searchParams.get("keyword") || ""; |
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 setSearchKeyword = (newKeyword) => { | ||
setSearchKeyword((prev) => ({ |
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 values = watch(); | ||
|
||
const allFieldsFilled = |
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.
register에 validation을 넣어주셨으면, useForm formState에서 isValid를 사용하실 수 있습니다~
https://www.react-hook-form.com/api/useform/formstate/
|
||
const AddItemPage = () => { | ||
const [previewUrl, setPreviewUrl] = useState(""); | ||
const [showWarning, setShowWarning] = useState(false); |
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.
이미지 관련 상태들은 ImageUploader에 들어가는 것이 좋겠죠~! :)
요구사항
기본
상품 등록
체크리스트 [심화]
상품 등록
주요 변경사항
배포 링크
https://panda-market-ten.vercel.app/
멘토에게