We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 299ee8c commit c55c541Copy full SHA for c55c541
src/components/LearningPath.astro
@@ -64,17 +64,19 @@ if (!firstModule)
64
<LinkButton href={"/" + module.slug + "/"} variant="secondary">
65
Start module
66
</LinkButton>
67
- <Details header={`Contains ${units.length} units`} open>
68
- <Steps>
69
- <ol>
70
- {units.map((unit) => (
71
- <li>
72
- <a href={"/" + unit.slug + "/"}>{unit.data.title}</a>
73
- </li>
74
- ))}
75
- </ol>
76
- </Steps>
77
- </Details>
+ {units.length > 0 && (
+ <Details header={`Contains ${units.length} units`} open>
+ <Steps>
+ <ol>
+ {units.map((unit) => (
+ <li>
+ <a href={"/" + unit.slug + "/"}>{unit.data.title}</a>
+ </li>
+ ))}
+ </ol>
+ </Steps>
78
+ </Details>
79
+ )}
80
</li>
81
);
82
})
0 commit comments