Skip to content

Commit

Permalink
fix: render null when lesson watched is false
Browse files Browse the repository at this point in the history
  • Loading branch information
zacjones93 committed Oct 21, 2024
1 parent 0548fa6 commit b4d3008
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/layouts/collection-page-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,12 @@ const CollectionPageLayout: React.FunctionComponent<
{lessons.length + playlistLessons.length} lessons
</span>
{courseProgress?.completed_lesson_count &&
courseProgress?.completed_lesson_count <
courseProgress.lesson_count && (
<span className="text-gray-700 dark:text-gray-400">
({courseProgress?.completed_lesson_count} watched)
</span>
)}
courseProgress?.completed_lesson_count <
courseProgress?.lesson_count ? (
<span className="text-gray-700 dark:text-gray-400">
({courseProgress?.completed_lesson_count} watched)
</span>
) : null}
</div>
</div>
</div>
Expand Down

0 comments on commit b4d3008

Please sign in to comment.