import {useState} from "react";
import TeamSizePopUp from "./TeamsizePopUp";

function StartButton() {
    const [openPopUp, setOpenPopUp] = useState(false)

    function startclicked() {
        setOpenPopUp(true);
    }

    return(
        <>
            <button className="MyButton" id="StartButton" onClick={startclicked}>
                Start Game
            </button>
            {openPopUp && <TeamSizePopUp closeModal={setOpenPopUp}/>}
        </>
    )
}

export default StartButton