Skip to content

Commit

Permalink
Redirect all types of learners to home
Browse files Browse the repository at this point in the history
no matter of their classess memberships, access to unasigned resources
settings, or whether they're signed-in or anonymous. From now on,
everyone wil lbe taken to the home page which content will adjust
correspondingly.
  • Loading branch information
MisRob committed Sep 14, 2021
1 parent 037b82f commit 7af8593
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions kolibri/plugins/learn/assets/src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,7 @@ export default [
name: PageNames.ROOT,
path: '/',
handler: () => {
const { memberships } = store.state;
const { canAccessUnassignedContent } = store.getters;

// If a registered user, go to Classes Page, else go to Content
return router.replace({
name:
memberships.length > 0 || !canAccessUnassignedContent
? ClassesPageNames.ALL_CLASSES
: PageNames.TOPICS_ROOT,
});
return router.replace({ name: PageNames.HOME });
},
},
{
Expand Down

0 comments on commit 7af8593

Please sign in to comment.