Skip to content

Commit

Permalink
fix: Draft - alternate players.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuartero committed Oct 20, 2023
1 parent 2a0a33a commit 36b35a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/draft.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import c from "classnames";
import { ReadyButton } from "elements/ready-button";
import { useState } from "react";
import { useEffect, useState } from "react";
import { DraftCard } from "elements/draft-card";

import type { DeckCard, Player, Selection } from "app-domain";
Expand Down Expand Up @@ -36,6 +36,10 @@ export function Draft({
},
});

useEffect(() => {
setCurrentPlayer(startingPlayer);
}, [startingPlayer]);

const ready = player1?.card && player2?.card;

const handleSelectCard = (card: Card) => {
Expand Down

0 comments on commit 36b35a7

Please sign in to comment.