Merge branch 'client' of gitlab.stud.idi.ntnu.no:felixalb/dcst1008-2022-group1 into client
This commit is contained in:
commit
e46cf2e5f7
|
@ -104,7 +104,9 @@ function Home() {
|
||||||
{/* <CreateButton /> */}
|
{/* <CreateButton /> */}
|
||||||
<Typography variant="h3">Tournaments</Typography>
|
<Typography variant="h3">Tournaments</Typography>
|
||||||
<CreateButton />
|
<CreateButton />
|
||||||
</Box>
|
<Typography variant="h2" style={{margin:'2% 0'}}>
|
||||||
|
Tournaments
|
||||||
|
</Typography>
|
||||||
<TournamentList />
|
<TournamentList />
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -130,11 +130,6 @@ function TeamEditor(props) {
|
||||||
.catch(error => showError(error));
|
.catch(error => showError(error));
|
||||||
}, [props.selectedTeamId]);
|
}, [props.selectedTeamId]);
|
||||||
|
|
||||||
function postEdit() {
|
|
||||||
let formData = new FormData();
|
|
||||||
formData.append("name", document.getElementById("teamNameInput").value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (props.selectedTeamId === -1 || !team) {
|
if (props.selectedTeamId === -1 || !team) {
|
||||||
return (
|
return (
|
||||||
<Paper sx={{minHeight: "30vh", width: "90vw", margin: "10px auto"}} component={Stack} direction="column" justifyContent="center">
|
<Paper sx={{minHeight: "30vh", width: "90vw", margin: "10px auto"}} component={Stack} direction="column" justifyContent="center">
|
||||||
|
@ -154,7 +149,6 @@ function TeamEditor(props) {
|
||||||
function saveTeam() {
|
function saveTeam() {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("name", team.name);
|
formData.append("name", team.name);
|
||||||
console.log(team);
|
|
||||||
let body = new URLSearchParams(formData)
|
let body = new URLSearchParams(formData)
|
||||||
fetch(process.env.REACT_APP_API_URL + `/team/${team.id}/edit`, {
|
fetch(process.env.REACT_APP_API_URL + `/team/${team.id}/edit`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
Loading…
Reference in New Issue