-
Notifications
You must be signed in to change notification settings - Fork 1
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
[가게 생성] 가게 생성/수정 리팩토링 #352
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.
많은 로직 걷어내시고 추가하시느라 고생하셨네요
몇가지 useEffect 사용과 관련되어서 의견 남겨놨습니다. 읽어보시고 답변주세요.
특히 useFunnel 추가해서 구현된 부분은 잘 정리해두면 좋을 것 같습니다.
const openTimeArray = Object.values(openTimeState); | ||
const closeTimeArray = Object.values(closeTimeState); | ||
const shopClosedArray = Object.values(shopClosedState); | ||
|
||
useEffect(() => { | ||
const openValue = DAY_OF_WEEK.map((day, index) => ({ | ||
close_time: closeTimeArray[index], | ||
closed: shopClosedArray[index], | ||
day_of_week: day, | ||
open_time: openTimeArray[index], | ||
})); | ||
setValue('image_urls', imageUrls); | ||
setValue('category_ids', [categoryId]); | ||
setValue('name', name); | ||
setValue('address', address); | ||
setValue('phone', phone); | ||
setValue('delivery_price', Number(deliveryPrice)); | ||
setValue('description', description); | ||
setValue('delivery', delivery); | ||
setValue('pay_bank', payBank); | ||
setValue('pay_card', payCard); | ||
setValue('open', openValue); | ||
}, [openTimeArray, closeTimeArray, shopClosedArray, categoryId, name, | ||
address, phone, deliveryPrice, description, delivery, payBank, payCard, imageUrls]); | ||
|
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.
키야~
src/page/ShopRegistration/view/Mobile/ShopConfirmation/index.tsx
Outdated
Show resolved
Hide resolved
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.
고생하셨습니다!
What is this PR? 🔍
Changes 📝
ScreenShot 📷
Test CheckList ✅
Precaution
✔️ Please check if the PR fulfills these requirements
develop
branch unconditionally?main
?yarn lint