Skip to content

Commit

Permalink
Add finished exercises message to DOJO exercises page
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjenningz committed Oct 3, 2022
1 parent 961e306 commit 2a10a33
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions pages/exercises/[lessonSlug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,24 @@ const ExerciseList = ({
</div>
)}
</div>
<div className={styles.exerciseList__container}>
{exercises.map((exercise, i) => (
<ExercisePreviewCard
key={i}
moduleName={exercise.moduleName}
state={exercise.state}
problem={exercise.problem}
/>
))}
<div />
<div />
</div>
{exercises.length > 0 ? (
<div className={styles.exerciseList__container}>
{exercises.map((exercise, i) => (
<ExercisePreviewCard
key={i}
moduleName={exercise.moduleName}
state={exercise.state}
problem={exercise.problem}
/>
))}
<div />
<div />
</div>
) : (
<p className="fs-5 text-center">
🎉 Congratulations! You finished all the exercises for this lesson! 🥳
</p>
)}
</>
)
}
Expand Down

0 comments on commit 2a10a33

Please sign in to comment.