-
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
[ Refactor/problem 94 ] 문제풀이 페이지 model 구현 #114
Conversation
- button info with title, classname - button state with problem state
- get svg fill color - isChoiceFill state - button Info with classname
오!! 비즈니스 로직을 한 번에 model 로 분리하니까 깔끔하네요 !! 👍 |
|
||
const onClickAnswerChoice = () => { | ||
if (!problemAnswerInfo) updateChoiceAnswer(number); | ||
if (!isProblemAnswerInfo()) updateChoiceAnswer(number); |
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.
model에서 만드는 비즈니스 로직들을 일단 다 함수로 만들고있긴해서 통일성을 지키려다보니 함수가 되었습니다. 혹시 더 좋은 의견이 있을까요?
(answerResultInfo && postChoiceAnswer.sub !== number && "#A5A5A5") || | ||
"" | ||
} | ||
isChoice={isChoiceFillCircle()} |
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.
models 폴더 위치는
problem/models 같은 폴더 구조로 가져가는거죵??
좋습니다!!
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.
네네! 문제페이지에서만 사용하는 모델이라 해당 폴더에 넣었습니다!
@soomin9106 모델 class로 수정한 commit 입니다! |
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.
오 굿굿 좋습니다 👍
🔥 Related Issues
resolve #94
close #94
💜 작업 내용
✅ PR Point
useAnswerChoiceModel
useAnswerSubmitModel