fix: proper label when translation for lesson not found

This commit is contained in:
Rotimi Best
2024-04-19 06:26:13 +01:00
parent d75e2f258e
commit 70a8644bb5
3 changed files with 7 additions and 4 deletions
@@ -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>
@@ -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">