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

26 lines
685 B

import React, { useState } from "react";
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;
return (
<section className="content">
{showFeed ? (
<Feed />
) : (
<Lobby
currentUserReady={currentUserReady}
onCurrentUserReadyChange={(b: boolean) => setCurrentUserReady(b)}
/>
)}
</section>
);
};
export default Centurion;