import * as React from "react"; import { Redirect } from "react-router"; import Grid from "@material-ui/core/Grid"; import Typography from "@material-ui/core/Typography"; import Button from "@material-ui/core/Button"; import Paper from "@material-ui/core/Paper"; import Scoreboard from "../components/scoreboard"; import { ILesson } from "../models/lesson"; import { ILearner } from "../models/learner"; interface IProps { nextLesson: () => ILesson; learners: ILearner[]; } interface IState { toLevel: number; } export default class Dashboard extends React.Component { constructor(props: any) { super(props); this.state = { toLevel: -1; }; } render() { const small = window.matchMedia("(max-width: 700px)").matches; const direction = small ? "column" : "row"; const lesson = this.props.nextLesson(); return
{ this.state.toLevel !== -1 ? ( ) : undefined } {`Level ${lesson.level}`} {lesson.name}
{lesson.desc}
Rangliste: Top 10 Some stuff
; } };