Skip to content

Commit

Permalink
addressed brandon's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj-Ram committed Jan 24, 2024
1 parent fa72de4 commit 7691ee0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/frontend/components/Plan/DeleteYearModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ export const DeleteYearModal: React.FC<DeleteYearModalProps> = ({

const deleteYear = async () => {
try {
removeYear(yearNum);
// refresh the cache, show success message, and close the modal
mutate(USE_STUDENT_WITH_PLANS_SWR_KEY);
// setSelectedPlanId(null);
removeYear(yearNum);
toast.success("Year deleted successfully.");
onClose();
} catch (error) {
Expand Down

0 comments on commit 7691ee0

Please sign in to comment.