Skip to content

Commit

Permalink
Confirmation prompt when clearing Roadmap (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 authored Jul 22, 2023
1 parent 35b0177 commit 6cd55c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion site/src/store/slices/roadmapSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ export const roadmapSlice = createSlice({
}
},
clearPlanner: (state) => {
state.yearPlans = [];
if(window.confirm("Are you sure you want to clear your Roadmap?")) {
state.yearPlans = [];
}
},
setActiveCourse: (state, action: PayloadAction<CourseGQLData>) => {
state.activeCourse = action.payload;
Expand Down

0 comments on commit 6cd55c7

Please sign in to comment.