feat: make explore more visible in lms

This commit is contained in:
Rotimi Best
2026-06-10 09:18:20 +01:00
parent 02ae9b81b8
commit dcb5cfbc7b
11 changed files with 223 additions and 27 deletions
@@ -38,9 +38,10 @@
isExplore?: boolean;
href?: string;
actions?: Snippet;
onExploreClick?: () => void;
}
let { course, isOnLandingPage, isLMS, isExplore, href, actions }: Props = $props();
let { course, isOnLandingPage, isLMS, isExplore, href, actions, onExploreClick }: Props = $props();
let {
bannerImage,
@@ -141,6 +142,10 @@
let cost = $derived(calcCourseDiscount(pricingData.discount, pricingData.cost ?? 0, !!pricingData.showDiscount));
let courseUrl = $derived.by(() => {
if (onExploreClick && isLMS && isExplore) {
return undefined;
}
if (href) {
return href;
}
@@ -299,7 +304,7 @@
</div>
{#if isLMS}
<Button variant="outline">
<Button variant="outline" onclick={isExplore && onExploreClick ? onExploreClick : undefined}>
{isExplore ? $t('courses.course_card.learn_more') : $t('courses.course_card.continue_course')}
<ArrowRightIcon class="custom" />