Skip to content

Commit

Permalink
fix: I added in a ternary conditional to check if type is side and un…
Browse files Browse the repository at this point in the history
…it to got to lo.parentTopic.route if not go lo.route
  • Loading branch information
20041540MichaelKelly committed Sep 10, 2023
1 parent 21c8c8a commit a2dd193
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
</script>

{#each topic.toc as lo}
<a href={lo?.parentTopic?.route} class="flex py-1">
<Icon type={lo.type} />
<span class="ml-2 mb-1"> {@html lo.title} </span>
{#if lo.video && lo.type != "panelvideo"}
<a class="flex pl-1" href={lo.video}>
<Icon type="video" />
</a>
{/if}
</a>
<a href={lo.type === "unit" ? lo?.parentTopic?.route : lo.type === "side" ? lo?.parentTopic?.route : lo?.route} class="flex py-1">
<Icon type={lo.type} />
<span class="ml-2 mb-1"> {@html lo.title} </span>
{#if lo.video && lo.type != "panelvideo"}
<a class="flex pl-1" href={lo.video}>
<Icon type="video" />
</a>
{/if}
</a>
{#if lo.type != "lab"}
{#if lo.los}
{#each lo.los as lo}
Expand Down

0 comments on commit a2dd193

Please sign in to comment.