Merge branch 'client' of gitlab.stud.idi.ntnu.no:felixalb/dcst1008-2022-group1 into client
This commit is contained in:
commit
e46cf2e5f7
|
@ -1,2 +1,2 @@
|
|||
REACT_APP_API_URL=https://asura.feal.no/api
|
||||
BROWSER=none
|
||||
BROWSER=none
|
||||
|
|
|
@ -104,8 +104,10 @@ function Home() {
|
|||
{/* <CreateButton /> */}
|
||||
<Typography variant="h3">Tournaments</Typography>
|
||||
<CreateButton />
|
||||
</Box>
|
||||
<TournamentList />
|
||||
<Typography variant="h2" style={{margin:'2% 0'}}>
|
||||
Tournaments
|
||||
</Typography>
|
||||
<TournamentList />
|
||||
</Container>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue