-
Notifications
You must be signed in to change notification settings - Fork 0
fix: 초기 메뉴 업로드시 예약할인 상태 변경 #136
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
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.
Summary of Changes
Hello @l-lyun, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
이 PR은 메뉴를 새로 생성하거나 초기화할 때 가격 입력 필드가 비활성화되는 사용자 인터페이스 문제를 해결합니다. MenuModal 컴포넌트 내에서 메뉴 항목의 기본 상태 값을 조정하여 사용자가 가격을 즉시 입력할 수 있도록 합니다.
Highlights
- 메뉴 초기 상태 수정: 메뉴 생성 및 리셋 시 가격 입력 필드가 비활성화되는 문제를 해결하기 위해
MenuModal컴포넌트의 초기 상태를 수정했습니다. - 상품 상태 및 예약 상태 변경: 초기
productStatus를 'HIDDEN'에서 'IN_STOCK'으로,reservationStatus를 'PENDING'에서null로 변경하여 가격 입력 필드가 정상적으로 활성화되도록 했습니다.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
이 PR은 새로운 메뉴를 추가할 때 초기 상태값을 변경하여 가격 입력 필드가 비활성화되는 문제를 해결합니다. productStatus를 'HIDDEN'에서 'IN_STOCK'으로, reservationStatus를 'PENDING'에서 null로 변경한 것은 올바른 수정으로 보입니다. 코드의 유지보수성을 높이기 위해, 중복되는 초기 메뉴 상태 객체를 상수로 추출하여 재사용하는 것을 제안하는 리뷰 의견을 남겼습니다.
| productStatus: 'IN_STOCK', | ||
| reservationStatus: null, |
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.
이곳의 초기 메뉴 상태 객체는 상단의 useState 선언(55-64행)에 있는 객체와 동일합니다. 코드 중복을 피하고 향후 유지보수를 용이하게 하기 위해, 이 객체를 컴포넌트 외부의 상수로 추출하여 두 곳에서 모두 참조하도록 리팩터링하는 것을 고려해 보세요.
예시:
const initialMenuState = {
image: null,
name: '',
originPrice: 0,
discountPrice: 0,
stock: 0,
productStatus: 'IN_STOCK',
reservationStatus: null,
tags: [],
};
const MenuModal = ({...}) => {
const [menu, setMenu] = useState(initialMenuState);
useEffect(() => {
if (initialData) {
setMenu(initialData);
} else {
setMenu(initialMenuState);
}
}, [initialData]);
// ...
}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.
LGTM
메인에 머지되면 release 브랜치에서 메인 rebase 한번 해야겠네
|
@l-lyun 머지 후 릴리즈 한 번 할게요 |
#️⃣연관된 이슈
📝작업 내용
스크린샷 (선택)
💬리뷰 요구사항(선택)
두개 상태로 인해 초기 메뉴 업로드시 가격 input이 disabled되어 변경했습니다.