🐛 Maybe fixed #100

This commit is contained in:
Mawoka
2022-09-17 14:48:24 +02:00
parent cd2e4245d0
commit 7673363518
+10 -3
View File
@@ -80,10 +80,16 @@
<div> <div>
<h1 class="mx-auto text-center text-6xl mt-8">{$t('play_page.end_sentence')}</h1> <h1 class="mx-auto text-center text-6xl mt-8">{$t('play_page.end_sentence')}</h1>
{#if data_available} {#if data_available}
{#if winners_arr[0][0] === undefined}
<div class="flex justify-center">
<h1 class="text-3xl">{$t('admin_page.no_answers')}</h1>
</div>
{:else}
<div class="flex mx-auto w-fit flex-col pt-8 gap-2"> <div class="flex mx-auto w-fit flex-col pt-8 gap-2">
<div> <div>
<p class="text-3xl text-center"> <p class="text-3xl text-center">
{$t('play_page.1st_place')}: <span class="underline">{winners_arr[0][0]}</span> {$t('play_page.1st_place')}:
<span class="underline">{winners_arr[0][0]}</span>
<span <span
>{$t('play_page.with_out_of', { >{$t('play_page.with_out_of', {
correct_questions: winners_arr[0][1] ?? 0, correct_questions: winners_arr[0][1] ?? 0,
@@ -92,7 +98,7 @@
> >
</p> </p>
</div> </div>
{#if winners_arr.length >= 2} {#if winners_arr.length >= 2 && winners_arr[1][0] !== undefined}
<div> <div>
<p class="text-2xl text-center"> <p class="text-2xl text-center">
{$t('play_page.2nd_place')}: {$t('play_page.2nd_place')}:
@@ -106,7 +112,7 @@
</p> </p>
</div> </div>
{/if} {/if}
{#if winners_arr.length >= 3} {#if winners_arr.length >= 3 && winners_arr[2][0] !== undefined}
<div> <div>
<p class="text-xl text-center"> <p class="text-xl text-center">
{$t('play_page.3rd place')}: {$t('play_page.3rd place')}:
@@ -121,6 +127,7 @@
</div> </div>
{/if} {/if}
</div> </div>
{/if}
{:else} {:else}
<div class="flex justify-center"> <div class="flex justify-center">
<h1 class="text-3xl">{$t('admin_page.no_answers')}</h1> <h1 class="text-3xl">{$t('admin_page.no_answers')}</h1>