fix: make sure player is active before drawing a card

This commit is contained in:
minie4 committed 2025-03-11 19:24:10 +01:00
1 parent 5c83cd6ce2
commit 4b13b9fc95
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -32,7 +32,12 @@
</div>
<div class="center grid grid-cols-2">
<div class="drawCard flex justify-center items-center">
<button class="draw" on:click={() => sessionStore.drawCard()}>
<button
class="draw"
on:click={() => {
if (get(playerActive)) sessionStore.drawCard();
}}
>
<svelte:component this={cardComponent} width={cardWidth} height={cardHeight} data={{ Color: "black", Symbol: "special:draw" }} />
</button>
</div>