frontend/src/components/RightBar/index.tsx

36 lines
863 B
TypeScript
Raw Normal View History

2020-06-07 15:57:51 +02:00
import React from "react";
import "./index.scss";
2020-06-14 14:24:49 +02:00
import Class, { Group } from "../Class";
2020-06-09 20:07:54 +02:00
2020-06-14 14:24:49 +02:00
interface RightBarProps {
onClassHover: (group_id: String, class_id: String) => void;
2020-06-14 17:21:00 +02:00
onClassClick: (group_id: String, class_id: String) => void;
2020-06-14 14:24:49 +02:00
lectures: Array<Group>;
}
2020-06-07 15:57:51 +02:00
interface RightBarState {}
export default class RightBar extends React.Component<
RightBarProps,
RightBarState
> {
render() {
return (
2020-06-12 16:17:48 +02:00
<div className="right-bar">
<div className="right-bar__text">
2020-06-07 15:57:51 +02:00
Hubert Wrzesiński<br></br>
Semestr zimowy 2020/2021
</div>
2020-06-14 14:24:49 +02:00
{this.props.lectures.map((classgroup, index) => (
<Class
onClassHover={this.props.onClassHover}
2020-06-14 17:21:00 +02:00
onClassClick={this.props.onClassClick}
2020-06-14 14:24:49 +02:00
data={classgroup}
key={index}
/>
))}
2020-06-07 15:57:51 +02:00
</div>
);
}
}