Skip to content

Commit

Permalink
hook change to correctly update state
Browse files Browse the repository at this point in the history
  • Loading branch information
qiandrewj committed Sep 27, 2024
1 parent ef3e1d5 commit 81b339a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/modules/Course/Components/ReviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ReviewModal = ({
}, [valid])
useEffect(() => {
if (isLoggedIn) {getNoReviews()}
}, [])
}, [valid])

Check warning on line 80 in client/src/modules/Course/Components/ReviewModal.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useEffect has missing dependencies: 'getNoReviews' and 'isLoggedIn'. Either include them or remove the dependency array

/**
* Determines if the current user has no reviews, so they should receive
Expand Down

0 comments on commit 81b339a

Please sign in to comment.