From d0897cdeed20ddbe8e5842c621a707ec6dd733e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Podlouck=C3=BD?= Date: Sun, 3 Mar 2024 10:31:29 +0100 Subject: [PATCH] Do now show lessons heading on courses with chapters --- .../[topicId]/(course)/[courseId]/[chapterId]/page.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/website/src/app/[topicId]/(course)/[courseId]/[chapterId]/page.tsx b/website/src/app/[topicId]/(course)/[courseId]/[chapterId]/page.tsx index 99c0822..07ed7e2 100644 --- a/website/src/app/[topicId]/(course)/[courseId]/[chapterId]/page.tsx +++ b/website/src/app/[topicId]/(course)/[courseId]/[chapterId]/page.tsx @@ -80,7 +80,7 @@ const ChapterPage = async ({ params }: Props): Promise => {

{course.lead}

- { course.intro && ( + { course.intro !== null && ( <>
{ course.intro.items.map((item) => ( @@ -92,9 +92,11 @@ const ChapterPage = async ({ params }: Props): Promise => { {/*

Přihlásit se na kurz

*/} -
-

Lekce

-
+ { chapter.name === 'lekce' && course.intro !== null && course.intro.items.length > 0 && ( +
+

Lekce

+
+ )} )} {