Kopie van https://gitlab.com/studieverenigingvia/ict/centurion met een paar aanpassingen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
centurion/frontend/src/components/Centurion.tsx

44 lines
1.1 KiB

import React, {useRef, useState} from "react";
5 years ago
import {Row} from "antd";
import {NumberParam, useQueryParam} from "use-query-params";
import {roomTime, useRoom, useRoomRunningChanged, useTick} from "../lib/Connection";
import NextShot from "./NextShot";
import Feed from "./Feed";
import ShotsTaken from "./ShotsTaken";
import Lobby from "./Lobby";
import logo from "../img/via-logo.svg";
import Player from "./Player";
const Centurion = () => {
let roomRunning = useRoomRunningChanged()?.running || false;
5 years ago
const feedContent = (
<React.Fragment>
<Player/>
<Row>
<NextShot/>
<Feed/>
<ShotsTaken/>
</Row>
</React.Fragment>
5 years ago
);
const lobbyContent = (
<Lobby/>
5 years ago
);
return (
<>
<section className="content">
{roomRunning ? feedContent : lobbyContent}
5 years ago
</section>
<footer>
<img src={logo} className="via-logo" alt="logo"/>
</footer>
</>
);
};
export default Centurion;