From d321bf3e486e7181743af5b4044693dc23b373c7 Mon Sep 17 00:00:00 2001 From: with-heart Date: Wed, 2 Apr 2025 18:44:17 -0400 Subject: [PATCH] toggle played when civ icon clicked in roster --- src/components/roster.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/roster.tsx b/src/components/roster.tsx index 9cb1f41..1a1bf2a 100644 --- a/src/components/roster.tsx +++ b/src/components/roster.tsx @@ -5,13 +5,13 @@ import { CivIcon } from './civ-icon' import { PlayedCheck } from './played-check' const RosterItem = ({ civ }: { civ: Civ }) => { - const { hasBeenPlayed } = useCiv(civ) + const { hasBeenPlayed, togglePlayed } = useCiv(civ) const animate = hasBeenPlayed ? ['visible', 'played'] : ['visible'] return ( { initial="hidden" exit="hidden" whileHover="hovered" + onClick={togglePlayed} >