fixed getting tournament props in match component in overview

This commit is contained in:
Kristoffer Longva Eriksen 2022-04-22 16:13:48 +02:00
parent 29502e4111
commit 18bc7d9561
1 changed files with 3 additions and 1 deletions

View File

@ -16,10 +16,12 @@ function showError(error) {
}
function TournamentTier(props){
const { tournamentId } = useParams();
let roundTypes = ["finals", "semifinals", "quarterfinals", "eighthfinals", "sixteenthfinals", "thirtysecondfinals"];
let matches = [];
for (let i = 0; i < props.matches.length; i++) {
matches.push(<Match teams={props.teams} match={props.matches[i]} key={i} />);
matches.push(<Match tournamentId={tournamentId} teams={props.teams} match={props.matches[i]} key={i} />);
}
return(
<ul className={`round ${roundTypes[props.tier]}`}>