diff --git a/react-fm/src/pages/adminMode/addGame/AddGame.tsx b/react-fm/src/pages/adminMode/addGame/AddGame.tsx index b890cbc4..c147f3f0 100644 --- a/react-fm/src/pages/adminMode/addGame/AddGame.tsx +++ b/react-fm/src/pages/adminMode/addGame/AddGame.tsx @@ -52,9 +52,9 @@ function AddGame() { const [endTime, setEndTime] = useState(''); const [credits, setCredits] = useState(''); const [testGame, setTestGame] = useState(false); - const [teamDivision, setTeamDivision] = useState(false); - const [team1Color, setTeam1Color] = useState(''); - const [team2Color, setTeam2Color] = useState(''); + // const [teamDivision, setTeamDivision] = useState(false); + // const [team1Color, setTeam1Color] = useState(''); + // const [team2Color, setTeam2Color] = useState(''); // console.log(testGame); @@ -262,9 +262,6 @@ function AddGame() { waitListPlayersCount: ${parseInt(playersCount) / 2} credits: ${Number(credits)} testGame: ${testGame} - teamDivision: ${teamDivision} - team1Color: "${team1Color}" - team2Color: "${team2Color}" } ) { isSuccessful @@ -437,69 +434,69 @@ function AddGame() { ); - const sectionSwitch = (usecase: 'testGame' | 'teamDivision') => ( - - - - - {usecase === 'testGame' ? 'Test Game' : 'Team Division'} - - - { - usecase === 'testGame' ? setTestGame(!testGame) : setTeamDivision(!teamDivision); - }} - color="default" - sx={{ - '& .MuiSwitch-switchBase.Mui-checked': { - color: '#4ce95a', - }, - '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { - backgroundColor: '#4ce95a', - }, - }} - /> - - - ); - - const sectionTeamColors = () => ( - - - - - Team 1 - - setTeam1Color(e.target.value)} - placeholder="Team 1" - id="fullWidth" - type="text" - /> - - - - - - - Team 2 - - setTeam2Color(e.target.value)} - placeholder="Team 2" - id="fullWidth" - type="text" - /> - - - - ); + // const sectionSwitch = (usecase: 'testGame' | 'teamDivision') => ( + // + // + // + // + // {usecase === 'testGame' ? 'Test Game' : 'Team Division'} + // + // + // { + // usecase === 'testGame' ? setTestGame(!testGame) : setTeamDivision(!teamDivision); + // }} + // color="default" + // sx={{ + // '& .MuiSwitch-switchBase.Mui-checked': { + // color: '#4ce95a', + // }, + // '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { + // backgroundColor: '#4ce95a', + // }, + // }} + // /> + // + // + // ); + + // const sectionTeamColors = () => ( + // + // + // + // + // Team 1 + // + // setTeam1Color(e.target.value)} + // placeholder="Team 1" + // id="fullWidth" + // type="text" + // /> + // + // + + // + // + // + // Team 2 + // + // setTeam2Color(e.target.value)} + // placeholder="Team 2" + // id="fullWidth" + // type="text" + // /> + // + // + // + // ); const sectionFourth = () => ( @@ -553,10 +550,28 @@ function AddGame() { - {sectionSwitch('testGame')} - {sectionSwitch('teamDivision')} + + + + Test Game + + setTestGame(!testGame)} + color="default" + sx={{ + '& .MuiSwitch-switchBase.Mui-checked': { + color: '#4ce95a', + }, + '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { + backgroundColor: '#4ce95a', + }, + }} + /> + + - {teamDivision && sectionTeamColors()}
{sectionFourth()}