chore: conditional rendering of umami
This commit is contained in:
@@ -116,6 +116,7 @@ class AppInitApi extends BaseApi {
|
||||
return;
|
||||
}
|
||||
|
||||
// This allows you to be on the landing page of an organization site and not be redirected
|
||||
if (isOrgSite && window.location.pathname === '/') {
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
|
||||
let { path, id, isStudent = false }: Props = $props();
|
||||
|
||||
const coursesListPath = $derived($globalStore.isOrgSite ? '/lms/mylearning' : `${$currentOrgPath}/courses`);
|
||||
const coursesListPath = $derived($globalStore.isStudent ? '/lms/mylearning' : `${$currentOrgPath}/courses`);
|
||||
const contentData = $derived(getCourseContent(courseApi.course));
|
||||
const sidebar = useSidebar();
|
||||
const contentCount = $derived.by(() => {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import { currentOrg } from '$lib/utils/store/org';
|
||||
import { profile } from '$lib/utils/store/user';
|
||||
import { coursesApi } from '$features/course/api';
|
||||
import { resolve } from '$app/paths';
|
||||
|
||||
let totalCompleted = $derived(
|
||||
coursesApi.enrolledCourses.reduce((acc, cur) => {
|
||||
@@ -38,7 +39,7 @@
|
||||
? $currentOrg.customization.dashboard.bannerText
|
||||
: $t('dashboard.lms_dashboard_hero')}
|
||||
</p>
|
||||
<Button onclick={() => goto('/lms/mylearning')}>
|
||||
<Button onclick={() => goto(resolve('/lms/mylearning', {}))}>
|
||||
{$t('dashboard.continue_learning')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
function onClick(org: AccountOrg) {
|
||||
if (org.id === $currentOrg.id) return;
|
||||
|
||||
localStorage.setItem('classroomio_org_sitename', org.siteName);
|
||||
localStorage.setItem('classroomio_org_sitename', org.siteName!);
|
||||
currentOrg.set(org);
|
||||
|
||||
setTheme(org.theme);
|
||||
setTheme(org.theme!);
|
||||
window.location.href = $currentOrgPath;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user