chore: cleaner way to implement redirect if role permission denied
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { globalStore } from '$lib/utils/store/app';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
export function redirectToLesson(settings, courseId) {
|
||||
const globalStoreVal = get(globalStore);
|
||||
|
||||
if (!settings && globalStoreVal.isOrgSite) {
|
||||
goto(`${courseId}/lessons?next=true`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user