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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user