diff --git a/components/Card.tsx b/components/Card.tsx index 769f3e0..a54aa92 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -1,5 +1,6 @@ 'use client'; +import { useState } from 'react'; import ToolTip from '@/components/ToolTip'; import StackTheDeck from '@/components/StackTheDeck'; import tarokkaCards from '@/constants/tarokkaCards'; @@ -19,6 +20,7 @@ type CardProps = { }; export default function Card({ dm, card, position, settings, flipAction }: CardProps) { + const [tooltip, setTooltip] = useState(null); const { aria, flipped } = card; const handleClick = () => { @@ -43,7 +45,7 @@ export default function Card({ dm, card, position, settings, flipAction }: CardP }; return ( - +
{dm && !flipped && ( - console.log('Redo')} onPick={() => console.log('Pick')} /> + console.log('Redo')} + onPick={() => console.log('Pick')} + onHover={setTooltip} + /> )}