import React, { useState, useContext } from 'react'; import './index.scss'; import { Lecture } from '../../types'; import LectureCard from './LectureCard'; import { LecturesContext } from '../../contexts/LecturesProvider'; interface RightBarProps { onGroupMouseOver: (id: string, name: string) => void; } export default function RightBar({ onGroupMouseOver }: RightBarProps) { const [selectedCardId, setSelectedCardId] = useState(null); const lecturesContext = useContext(LecturesContext); const onCardClick = (e: React.MouseEvent) => { const target = e.currentTarget as HTMLElement; selectedCardId === target.id ? setSelectedCardId(null) : setSelectedCardId(target.id); }; return (
Hubert WrzesiƄski

Semestr zimowy 2020/2021
{lecturesContext?.lectures.map((lecture, index) => ( ))}
); }