Skip to content

Conversation

saseungmin
Copy link
Collaborator

@saseungmin saseungmin commented Apr 7, 2021

  • Apply Average rating for study reviews with CSS
  • Separated into AverageReview Component
  • 리뷰 작성 후 리뷰에 대한 후처리 action 추가

스크린샷 2021-04-08 오전 6 02 13

- Apply Average rating for study reviews with CSS
- Separated into AverageReview Component
- 리뷰 작성 후 리뷰에 대한 후처리 action 추가
@saseungmin saseungmin added enhancement New feature or request UI / UX Working for CSS labels Apr 7, 2021
Comment on lines +140 to 173

setGroupReview(state, { payload: review }) {
const { group } = state;

if (group.reviews) {
return {
...state,
group: {
...group,
reviews: [
{
...review,
createDate: new Date().toString(),
},
...group.reviews,
],
},
};
}

return {
...state,
group: {
...group,
reviews: [
{
...review,
createDate: new Date().toString(),
},
],
},
};
},
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 각 그룹에 대한 스터디 후기에 대한 후처리 부분인데 immer를 사용하면 더 깔끔하게 작성할 수 있을 듯 싶다..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request UI / UX Working for CSS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant