import React, { useState, useContext } from "react"; import "./index.scss"; import { Lecture } from "../../businesslogic/mockData/lectures"; import LectureCard from "./LectureCard"; import { LecturesContext } from "../../businesslogic/LecturesProvider"; interface RightBarProps { onGroupMouseOver: (id: string, name: string) => void; onGroupClick: (id: string, name: string) => void; lectures: Array; } export default function RightBar({ lectures, onGroupMouseOver, onGroupClick }: 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 (
{/* {(context) =>

{JSON.stringify((context as BuisnessProvided).states.user?.ticket)}

}
*/}
Hubert WrzesiƄski

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