Skip to content

Commit 655bab7

Browse files
Issue feat unauthorize page condition
1 parent 2bfb35a commit 655bab7

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

apps/learner-web-app/src/components/Content/Player.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@ const App = ({
9292
return;
9393
}
9494
}
95-
}
9695
if(localStorage.getItem('channelId')!==rt.channel)
97-
{
98-
router.push('/unauthorized');
99-
return;
96+
{
97+
router.push('/unauthorized');
98+
return;
99+
}
100100
}
101+
101102

102103
const response2 = await ContentSearch({
103104
filters: {

mfes/content/src/components/Content/ContentEnroll.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ if(!isThematicPath && !isPosPath && result?.program) {
7171
router.push('/unauthorized');
7272
return;
7373
}
74-
}}
75-
if(localStorage.getItem('channelId')!==result.channel)
76-
{
77-
router.push('/unauthorized');
78-
return;
79-
}
74+
} if(localStorage.getItem('channelId')!==result.channel)
75+
{
76+
router.push('/unauthorized');
77+
return;
78+
}
79+
80+
}
81+
8082
const userId = getUserId(props?._config?.userIdLocalstorageName);
8183
setCheckLocalAuth(checkAuth(Boolean(userId)));
8284
if (props?._config?.isEnrollmentRequired !== false) {

0 commit comments

Comments
 (0)