From 94ee1b30d89767bc7404e615511906e79126ad51 Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Wed, 20 Nov 2024 13:02:14 +0000 Subject: [PATCH] [Docs Site] Only show child units in LP when present --- src/components/LearningPath.astro | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/LearningPath.astro b/src/components/LearningPath.astro index fe32e649e1e448f..060a2943c496cac 100644 --- a/src/components/LearningPath.astro +++ b/src/components/LearningPath.astro @@ -64,17 +64,19 @@ if (!firstModule) Start module -
- -
    - {units.map((unit) => ( -
  1. - {unit.data.title} -
  2. - ))} -
-
-
+ {units.length > 0 && ( +
+ +
    + {units.map((unit) => ( +
  1. + {unit.data.title} +
  2. + ))} +
+
+
+ )} ); })