diff --git a/src/components/RightBar/index.tsx b/src/components/RightBar/index.tsx index 89f5e61..4007716 100644 --- a/src/components/RightBar/index.tsx +++ b/src/components/RightBar/index.tsx @@ -13,7 +13,7 @@ export default function RightBar({ lectures, onGroupMouseOver, onGroupClick }: R const [selectedCardId, setSelectedCardId] = useState(null); const onCardClick = (e: React.MouseEvent) => { - const target = e.target as HTMLElement; + const target = e.currentTarget as HTMLElement; selectedCardId === target.id ? setSelectedCardId(null) : setSelectedCardId(target.id); };