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

27 lines
685 B

import React, { useState } from "react";
4 years ago
import { useRoomRunningAndReadyChanged } from "../lib/Connection";
import Feed from "./Feed";
import Lobby from "./Lobby";
const Centurion = () => {
const [currentUserReady, setCurrentUserReady] = useState(false);
const room = useRoomRunningAndReadyChanged();
const showFeed = (room?.readyToParticipate && currentUserReady) || false;
4 years ago
return (
<section className="content">
{showFeed ? (
<Feed />
) : (
<Lobby
currentUserReady={currentUserReady}
onCurrentUserReadyChange={(b: boolean) => setCurrentUserReady(b)}
/>
)}
</section>
);
4 years ago
};
export default Centurion;