Merge branch 'client' of gitlab.stud.idi.ntnu.no:felixalb/dcst1008-2022-group1 into client

This commit is contained in:
Kristoffer Juelsenn 2022-03-29 14:36:40 +02:00
commit e46cf2e5f7
3 changed files with 5 additions and 9 deletions

View File

@ -104,7 +104,9 @@ function Home() {
{/* <CreateButton /> */}
<Typography variant="h3">Tournaments</Typography>
<CreateButton />
</Box>
<Typography variant="h2" style={{margin:'2% 0'}}>
Tournaments
</Typography>
<TournamentList />
</Container>
</>

View File

@ -130,11 +130,6 @@ function TeamEditor(props) {
.catch(error => showError(error));
}, [props.selectedTeamId]);
function postEdit() {
let formData = new FormData();
formData.append("name", document.getElementById("teamNameInput").value);
}
if (props.selectedTeamId === -1 || !team) {
return (
<Paper sx={{minHeight: "30vh", width: "90vw", margin: "10px auto"}} component={Stack} direction="column" justifyContent="center">
@ -154,7 +149,6 @@ function TeamEditor(props) {
function saveTeam() {
let formData = new FormData();
formData.append("name", team.name);
console.log(team);
let body = new URLSearchParams(formData)
fetch(process.env.REACT_APP_API_URL + `/team/${team.id}/edit`, {
method: "POST",