throttle 'tilts' from the server
This commit is contained in:
@@ -14,7 +14,7 @@ type CardSelectProps = {
|
||||
};
|
||||
|
||||
export default function CardSelect({ className = '' }: CardSelectProps) {
|
||||
const { gameData, select, selectCardIndex, setSelectCardIndex } = useAppContext();
|
||||
const { gameData, emitSelect, selectCardIndex, setSelectCardIndex } = useAppContext();
|
||||
const { cards: hand, settings } = gameData;
|
||||
|
||||
const handIDs = hand.map(({ id }) => id);
|
||||
@@ -53,7 +53,7 @@ export default function CardSelect({ className = '' }: CardSelectProps) {
|
||||
<div
|
||||
key={card.id}
|
||||
className={`relative h-[21vh] w-[15vh] perspective transition-transform duration-200 hover:scale-150 z-0 hover:z-10`}
|
||||
onClick={() => select(card.id)}
|
||||
onClick={() => emitSelect(card.id)}
|
||||
>
|
||||
<img
|
||||
src={getURL(card, settings)}
|
||||
|
||||
Reference in New Issue
Block a user