chore: debug join course
This commit is contained in:
+7
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user