-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat: 수정 페이지 제작 #46
The head ref may contain hidden characters: "feature-\uD669\uC740\uC9C0"
Feat: 수정 페이지 제작 #46
Conversation
✅ Deploy Preview for globalnomad-5-8 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
import { useEffect } from 'react'; | ||
import { RegisterFormProps } from './RegisterForm.types'; | ||
import useEditMyActivity from '@/hooks/myActivity/useEditMyActivity'; | ||
import useResetRegisterState from '../../../hooks/myActivity/useResetRegisterState'; |
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.
수정 파트가 구현이 까다로웠을텐데 정말 수고 많으셨습니다!!
// form 제출이 가능한지 체크 | ||
const isAllFieldsValid = () => { | ||
const { title, description, price } = getValues(); | ||
return ( | ||
!!title && | ||
!!description && | ||
!!price && | ||
!errors.title && | ||
!errors.description && | ||
!errors.price && | ||
selectedKateogorie.name !== '' && | ||
address !== '' && | ||
bannerImage.length !== 0 && | ||
isTimeFieldValid() | ||
); | ||
}; |
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.
요기 리액트 훅폼 getValues 보다는 watch() 추천드립니다!
얼마전 보민님과도 공유한 내용인데, getValues를 쓰게되면 직접 타이핑한 값(복붙제외)만 인식이 되어서 좀 번거롭더라구요..
🔎 작업 내용
📢 전달사항
(혹시 나중에 비슷한 오류 발생 시 말씀주세용 😭)