fix: proper label when translation for lesson not found
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="{className} w-full h-[517px] flex items-center justify-center flex-col border rounded border-gray-200 dark:border-neutral-600"
|
class="{className} w-full max-w-[500px] mx-auto h-[350px] flex items-center justify-center flex-col border rounded border-gray-200 dark:border-neutral-600"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+5
-2
@@ -17,6 +17,9 @@
|
|||||||
$lessonByTranslation[lessonId],
|
$lessonByTranslation[lessonId],
|
||||||
$lesson.locale
|
$lesson.locale
|
||||||
);
|
);
|
||||||
|
$: hasAtLeastOneTranslation = Object.values($lessonByTranslation[lessonId]).some(
|
||||||
|
(c) => !!c.length
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !isHtmlValueEmpty(content)}
|
{#if !isHtmlValueEmpty(content)}
|
||||||
@@ -27,10 +30,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</HtmlRender>
|
</HtmlRender>
|
||||||
{:else}
|
{:else if hasAtLeastOneTranslation}
|
||||||
<Box className="text-center">
|
<Box className="text-center">
|
||||||
<AlignBoxTopLeft class="carbon-icon" size={32} />
|
<AlignBoxTopLeft class="carbon-icon" size={32} />
|
||||||
<h3 class="text-xl font-normal dark:text-white py-2">
|
<h3 class="text-md font-normal dark:text-white py-2">
|
||||||
{$t('course.navItem.lessons.materials.no_translation')}
|
{$t('course.navItem.lessons.materials.no_translation')}
|
||||||
</h3>
|
</h3>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
label={$t('courses.lesson_card.continue_course')}
|
label={$t('courses.lesson_card.continue_course')}
|
||||||
variant={VARIANTS.OUTLINED}
|
variant={VARIANTS.OUTLINED}
|
||||||
className="rounded-none text-primary-600"
|
className="rounded-none"
|
||||||
/>
|
/>
|
||||||
{:else if !isOnLandingPage}
|
{:else if !isOnLandingPage}
|
||||||
<div class="flex flex-col justify-between">
|
<div class="flex flex-col justify-between">
|
||||||
|
|||||||
Reference in New Issue
Block a user