From 4d7161281da63a9a59e448a481a15be89284d851 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Mon, 3 Apr 2023 23:09:55 +0200 Subject: [PATCH] ui: Next button is back! --- .../ui/src/lib/components/ExerciceSolved.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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}