Skip to content

Commit

Permalink
Clear selection after add review
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
vinothpandian committed Aug 24, 2022
1 parent 87af2fb commit bfddc42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/learn/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
function clearSelected() {
selectedProblems = {};
someProblemSelected = false;
showReviewPopup = false;
}
Expand All @@ -49,7 +50,7 @@
async function handleAddReview(event: CustomEvent<ReviewInfo>) {
const { difficulty, reviewDate } = event.detail;
const problemIds = Object.keys(selectedProblems).map((id) => Number(id));
showReviewPopup = false;
clearSelected();
await addReviews(reviewDate, difficulty, problemIds);
toast.success('Reviews added..');
invalidate();
Expand Down

0 comments on commit bfddc42

Please sign in to comment.