feat: certificates, landing pages, ai tutor, website update, compliance

This commit is contained in:
Rotimi Best
2026-05-18 03:47:22 +01:00
parent c31ad63955
commit ac3a2c14a7
644 changed files with 56050 additions and 5439 deletions
@@ -1,16 +1,42 @@
<script lang="ts">
import { PageRestricted } from '$features/ui';
import { currentOrg } from '$lib/utils/store/org';
import { onMount } from 'svelte';
import { afterNavigate } from '$app/navigation';
import { env } from '$env/dynamic/public';
import { analytics } from '@cio/analytics/client';
import type { Snippet } from 'svelte';
import type { AccountOrg } from '$features/app/types';
interface Props {
children?: import('svelte').Snippet;
children?: Snippet;
data: {
isOrgSite: boolean;
org: import('$features/app/types').AccountOrg | null;
org: AccountOrg | null;
};
}
let { children, data }: Props = $props();
onMount(() => {
if (!env.PUBLIC_SERVER_URL) return;
analytics.init({
endpoint: `${env.PUBLIC_SERVER_URL.replace(/\/$/, '')}/dash/track`,
orgId: data.org?.id ?? undefined
});
analytics.pageView({ kind: 'landing' });
});
afterNavigate(({ to }) => {
if (!to) return;
const isCoursePage = /\/course\//.test(to.url.pathname);
analytics.pageView({
kind: isCoursePage ? 'course' : 'landing',
path: to.url.pathname
});
});
</script>
{#if data.org?.isRestricted || $currentOrg.isRestricted}