Add pets for tiers 1-3.
This commit is contained in:
@@ -17,10 +17,18 @@ export function ArrangePhase({ view, you, send }: Props) {
|
||||
const dragIndex = useRef<number | null>(null)
|
||||
const locked = you.ready
|
||||
|
||||
// If the server-side deck changes (shouldn't during arrange, but be safe),
|
||||
// resync.
|
||||
// Resync only if the deck's actual contents changed — every broadcast
|
||||
// creates a fresh array, and blindly resetting would wipe an in-progress
|
||||
// ordering whenever the opponent acts.
|
||||
useEffect(() => {
|
||||
setOrder(you.deck ?? [])
|
||||
setOrder((prev) => {
|
||||
const deck = you.deck ?? []
|
||||
const ids = new Set(deck.map((c) => c.id))
|
||||
if (prev.length === deck.length && prev.every((c) => ids.has(c.id))) {
|
||||
return prev
|
||||
}
|
||||
return deck
|
||||
})
|
||||
}, [you.deck])
|
||||
|
||||
function move(from: number, to: number) {
|
||||
|
||||
Reference in New Issue
Block a user