fix: course landing page bugs
This commit is contained in:
@@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
let discount = 0;
|
let discount = 0;
|
||||||
let paymentLink = '';
|
let paymentLink = '';
|
||||||
let showDiscount = false;
|
let showDiscount: boolean | undefined = undefined;
|
||||||
let giftToggled = false;
|
let giftToggled: boolean | undefined = undefined;
|
||||||
|
|
||||||
let hasBeenSet = false;
|
let hasBeenSet = false;
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
giftToggled = get(course, 'metadata.reward.show', false);
|
giftToggled = get(course, 'metadata.reward.show', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setter(value: string | number | boolean, setterKey: string) {
|
function setter(value: string | number | boolean | undefined, setterKey: string) {
|
||||||
if (typeof value !== 'boolean' && !value) return;
|
if (typeof value !== 'boolean' && !value) return;
|
||||||
|
|
||||||
const _course = cloneDeep(course);
|
const _course = cloneDeep(course);
|
||||||
|
|||||||
@@ -120,6 +120,7 @@
|
|||||||
attendance: undefined,
|
attendance: undefined,
|
||||||
group: undefined,
|
group: undefined,
|
||||||
lessons: undefined,
|
lessons: undefined,
|
||||||
|
polls: undefined,
|
||||||
slug: course.slug
|
slug: course.slug
|
||||||
});
|
});
|
||||||
loading = false;
|
loading = false;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
|
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
|
||||||
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
|
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
|
||||||
import { calDateDiff } from '$lib/utils/functions/date';
|
import { calDateDiff } from '$lib/utils/functions/date';
|
||||||
|
import { currentOrg } from '$lib/utils/store/org';
|
||||||
|
|
||||||
export let editMode = false;
|
export let editMode = false;
|
||||||
export let courseData: Course;
|
export let courseData: Course;
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{get(courseData, 'title', '')}</title>
|
<title>{editMode ? '[app] - ' : ''}{get(courseData, 'title', '')}</title>
|
||||||
<meta name="description" content={get(courseData, 'description', '')} />
|
<meta name="description" content={get(courseData, 'description', '')} />
|
||||||
<meta name="theme-color" content="#ffffff" />
|
<meta name="theme-color" content="#ffffff" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
@@ -421,7 +422,7 @@
|
|||||||
<img
|
<img
|
||||||
alt="Author Avatar"
|
alt="Author Avatar"
|
||||||
class="block rounded-full h-20 w-20 mr-3"
|
class="block rounded-full h-20 w-20 mr-3"
|
||||||
src={get(instructor, 'imgUrl', '')}
|
src={get(instructor, 'imgUrl', $currentOrg.avatar_url)}
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<p class="dark:text-white text-md font-light">
|
<p class="dark:text-white text-md font-light">
|
||||||
|
|||||||
Reference in New Issue
Block a user