diff --git a/frontend/ui/src/lib/components/ExerciceSolved.svelte b/frontend/ui/src/lib/components/ExerciceSolved.svelte index 383fae10..8c30d18e 100644 --- a/frontend/ui/src/lib/components/ExerciceSolved.svelte +++ b/frontend/ui/src/lib/components/ExerciceSolved.svelte @@ -13,6 +13,15 @@ export let theme = {}; export let exercice = {}; + + let next = null; + $: { + for (const ex of theme.exercices) { + if (ex.id == exercice.id && ex.next) { + next = ex.next; + } + } + } @@ -36,8 +45,8 @@
{/if} {/if} - {#if theme.exercices[exercice.id] && theme.exercices[exercice.id].next} - Passer au défi suivant + {#if next} + Passer au défi suivant {/if}