feat(join): hide join button if already on a room

This commit is contained in:
Yael Arturo Chavoya Andalón
2024-09-27 12:36:35 -06:00
committed by Sparsh Goenka
parent db4a58c3e6
commit e285fa4801

View File

@@ -21,6 +21,7 @@
>
<div class="space-y-4 max-w-[70%]">
{#if roomCode}
<div class="text-center text-lg text-primary-content">Share this code with your opponent to play</div>
<div class="space-x-2 flex flex-row justify-center items-center">
<div
class="text-3xl font-bold tracking-widest text-secondary-content font-mono bg-secondary py-3 rounded-full px-12"
@@ -40,6 +41,7 @@
Create Room
</button>
{/if}
{#if !roomCode}
<div class="text-center text-lg text-primary-content">OR</div>
<div class="space-y-2">
<input
@@ -56,5 +58,6 @@
Join Room
</button>
</div>
{/if}
</div>
</div>