Allow new students to access this course
+Early bird offer. Buy ASAP
diff --git a/src/lib/components/CourseLandingPage/index.svelte b/src/lib/components/CourseLandingPage/index.svelte index caf3ff43..0df31447 100644 --- a/src/lib/components/CourseLandingPage/index.svelte +++ b/src/lib/components/CourseLandingPage/index.svelte @@ -40,7 +40,7 @@ let totalRatings = 0; let startCoursePayment = false; let isVisible = false; - let observer; + let observer: { destroy: () => void }; // initialize the expandDescription array with 'false' values for each review. let expandDescription = Array(reviews.length).fill(false); @@ -75,7 +75,7 @@ onMount(() => { window.onhashchange = locationHashChanged; const targetNode = document.querySelector('.target-component'); - observer = observeIntersection(targetNode, (inView) => { + observer = observeIntersection(targetNode, (inView: boolean) => { isVisible = inView; }); }); @@ -132,6 +132,7 @@ onClick={() => { startCoursePayment = true; }} + isDisabled={!editMode && !courseData.metadata.allowNewStudent} /> diff --git a/src/lib/utils/types/index.ts b/src/lib/utils/types/index.ts index 6f1e45dd..e6d583c4 100644 --- a/src/lib/utils/types/index.ts +++ b/src/lib/utils/types/index.ts @@ -81,6 +81,7 @@ interface CourseMetadata { lessonTabsOrder?: Array