fixed getting tournament props in match component in overview
This commit is contained in:
parent
29502e4111
commit
18bc7d9561
|
@ -16,10 +16,12 @@ function showError(error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function TournamentTier(props){
|
function TournamentTier(props){
|
||||||
|
const { tournamentId } = useParams();
|
||||||
|
|
||||||
let roundTypes = ["finals", "semifinals", "quarterfinals", "eighthfinals", "sixteenthfinals", "thirtysecondfinals"];
|
let roundTypes = ["finals", "semifinals", "quarterfinals", "eighthfinals", "sixteenthfinals", "thirtysecondfinals"];
|
||||||
let matches = [];
|
let matches = [];
|
||||||
for (let i = 0; i < props.matches.length; i++) {
|
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(
|
return(
|
||||||
<ul className={`round ${roundTypes[props.tier]}`}>
|
<ul className={`round ${roundTypes[props.tier]}`}>
|
||||||
|
|
Loading…
Reference in New Issue