ui: Next button is back!
This commit is contained in:
parent
0c7eecf315
commit
4d7161281d
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<Card class="border-success mb-2">
|
||||
|
@ -36,8 +45,8 @@
|
|||
<hr>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if theme.exercices[exercice.id] && theme.exercices[exercice.id].next}
|
||||
<a href="{theme.urlid}/{theme.exercices[theme.exercices[exercice.id].next].urlid}" class="btn btn-success">Passer au défi suivant</a>
|
||||
{#if next}
|
||||
<a href="{theme.urlid}/{theme.exercices[next].urlid}" class="btn btn-success">Passer au défi suivant</a>
|
||||
{/if}
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
|
Loading…
Reference in New Issue
Block a user