Skip to content

Commit

Permalink
Conditionalizes the loading action for quiz routes
Browse files Browse the repository at this point in the history
  • Loading branch information
akolson committed Jan 30, 2024
1 parent 171f6bb commit 2a50831
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion kolibri/plugins/coach/assets/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ class CoachToolsModule extends KolibriApp {
redirectBrowser();
return;
}
this.store.dispatch('loading');

const skipLoading = [
PageNames.EXAM_CREATION_ROOT,
PageNames.QUIZ_SECTION_EDITOR,
PageNames.QUIZ_REPLACE_QUESTIONS,
PageNames.QUIZ_SELECT_RESOURCES,
PageNames.BOOK_MARKED_RESOURCES,
];
if (!skipLoading.includes(to.name)) {
this.store.dispatch('loading');
}
const promises = [];
// Clear the snackbar at every navigation to prevent it from re-appearing
// when the next page component mounts.
Expand Down

0 comments on commit 2a50831

Please sign in to comment.