Skip to content

Commit

Permalink
fix: reload page after fetching data (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
userMeh authored Jul 21, 2024
1 parent a72c080 commit 6c627a6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions apps/admin/app/ui/dashboard/tournaments/matches/AddMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,12 @@ function AddMatch(props: AddMatchProps) {
router.push('/');
return;
}
const url = `/dashboard/tournaments/matches?id_tournament=${props.idTournament}&created=true`;
window.location.href = url;
})
.catch((error) => {
console.error(error);
});

const url = `/dashboard/tournaments/matches?id_tournament=${props.idTournament}&created=true`;
window.location.href = url;
}

return (
Expand Down
5 changes: 2 additions & 3 deletions apps/admin/app/ui/dashboard/tournaments/matches/AddRound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ function AddRound(props: AddRoundProps) {
router.push('/');
return;
}
const url = `/dashboard/tournaments/matches?id_tournament=${props.id_tournament}&created=true`;
window.location.href = url;
})
.catch((error) => {
console.error(error);
});

const url = `/dashboard/tournaments/matches?id_tournament=${props.id_tournament}&created=true`;
window.location.href = url;
}

return (
Expand Down
5 changes: 2 additions & 3 deletions apps/admin/app/ui/dashboard/tournaments/matches/EditMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,12 @@ function EditMatch(props: EditMatchProps) {
router.push('/');
return;
}
const url = `/dashboard/tournaments/matches?id_tournament=${props.idTournament}&updated=true`;
window.location.href = url;
})
.catch((error) => {
console.error(error);
});

const url = `/dashboard/tournaments/matches?id_tournament=${props.idTournament}&updated=true`;
window.location.href = url;
}

return (
Expand Down
5 changes: 2 additions & 3 deletions apps/admin/app/ui/dashboard/tournaments/matches/EditRound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ function EditRound(props: EditRoundProps) {
router.push('/');
return;
}
const url = `/dashboard/tournaments/matches?id_tournament=${props.round.id_tournament}&updated=true`;
window.location.href = url;
})
.catch((error) => {
console.error(error);
});

const url = `/dashboard/tournaments/matches?id_tournament=${props.round.id_tournament}&updated=true`;
window.location.href = url;
}

return (
Expand Down

0 comments on commit 6c627a6

Please sign in to comment.