fix: proper label when translation for lesson not found
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
</script>
|
||||
|
||||
<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 />
|
||||
</div>
|
||||
|
||||
+5
-2
@@ -17,6 +17,9 @@
|
||||
$lessonByTranslation[lessonId],
|
||||
$lesson.locale
|
||||
);
|
||||
$: hasAtLeastOneTranslation = Object.values($lessonByTranslation[lessonId]).some(
|
||||
(c) => !!c.length
|
||||
);
|
||||
</script>
|
||||
|
||||
{#if !isHtmlValueEmpty(content)}
|
||||
@@ -27,10 +30,10 @@
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
</HtmlRender>
|
||||
{:else}
|
||||
{:else if hasAtLeastOneTranslation}
|
||||
<Box className="text-center">
|
||||
<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')}
|
||||
</h3>
|
||||
</Box>
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
<PrimaryButton
|
||||
label={$t('courses.lesson_card.continue_course')}
|
||||
variant={VARIANTS.OUTLINED}
|
||||
className="rounded-none text-primary-600"
|
||||
className="rounded-none"
|
||||
/>
|
||||
{:else if !isOnLandingPage}
|
||||
<div class="flex flex-col justify-between">
|
||||
|
||||
Reference in New Issue
Block a user