{#if !success}
Connect!
{#if errorMessage !== ''}
{errorMessage}
{/if} {:else if !game_started}
Pin: {quiz_data.game_pin}
{#if players.length > 0} {#each players as player}
{player.username}
Kick
{/each} {/if}
{#if players.length > 0}
{ socket.emit('start_game', ''); game_started = true; }}>Start Game
{/if} {:else}
Time left: {timer_res}
{#if timer_res === '0'}
Get results
{#if question_results !== null}
{#each question_results as result}
{result.username} - {result.answer} - {result.right}
{/each}
{/if} {/if}
{#each quiz_data.questions as { question }, index}
{ set_question_number(index); }}>{index}: {question}
{/each} {/if}