chore: debug join course

This commit is contained in:
Rotimi Best
2025-11-08 04:52:42 +01:00
parent 2d7de6609c
commit 570b809111
@@ -2,8 +2,11 @@
import get from 'lodash/get';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import getCurrencyFormatter from '$lib/utils/functions/getCurrencyFormatter';
import { isCourseFree } from '$lib/utils/functions/course';
import { getStudentInviteLink } from '$lib/utils/functions/course';
import {
isCourseFree,
getStudentInviteLink,
calcCourseDiscount
} from '$lib/utils/functions/course';
import { currentOrg, currentOrgDomain } from '$lib/utils/store/org';
import { goto } from '$app/navigation';
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
@@ -12,7 +15,6 @@
import { ROLE } from '$lib/utils/constants/roles';
import { capturePosthogEvent } from '$lib/utils/services/posthog';
import { t } from '$lib/utils/functions/translations';
import { calcCourseDiscount } from '$lib/utils/functions/course';
export let className = '';
export let editMode = false;
@@ -35,8 +37,10 @@
course_cost: courseData.cost,
course_free: isFree
});
console.log('$currentOrg', $currentOrg);
if (isFree) {
const link = getStudentInviteLink(courseData, $currentOrg.siteName, $currentOrgDomain);
console.log('link', link);
goto(link);
} else {
openModal = true;