Changed target to current target
This commit is contained in:
parent
3f5e672e5c
commit
9c7900b022
@ -13,7 +13,7 @@ export default function RightBar({ lectures, onGroupMouseOver, onGroupClick }: R
|
|||||||
const [selectedCardId, setSelectedCardId] = useState<string | null>(null);
|
const [selectedCardId, setSelectedCardId] = useState<string | null>(null);
|
||||||
|
|
||||||
const onCardClick = (e: React.MouseEvent) => {
|
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);
|
selectedCardId === target.id ? setSelectedCardId(null) : setSelectedCardId(target.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user