feat: fade out hover avatar when player stops hovering

Avatar now fades out smoothly when:
- Player moves mouse off all cards
- Player's turn ends
- Player hasn't hovered any card yet

Opacity requires all three conditions: position exists, it's player's turn,
AND player is actively hovering a card (cardElement !== null).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-10-09 17:42:28 -05:00
parent 90be7c053c
commit 820eeb4fb0

View File

@@ -116,7 +116,7 @@ function HoverAvatar({
const springProps = useSpring({
x: position?.x ?? 0,
y: position?.y ?? 0,
opacity: position && isPlayersTurn ? 1 : 0,
opacity: position && isPlayersTurn && cardElement ? 1 : 0,
config: {
tension: 280,
friction: 60,