Continuing merge: add Statistics button to tournament page
This commit is contained in:
parent
bd994c9d04
commit
ecc1401042
|
|
@ -42,12 +42,20 @@ function StatusBar(props) {
|
||||||
<Container className='px-3'>
|
<Container className='px-3'>
|
||||||
<Navbar.Brand>
|
<Navbar.Brand>
|
||||||
{props.tournament.name}
|
{props.tournament.name}
|
||||||
<EditButton id={props.id} isOwner={props.isOwner} isSignedIn={props.isSignedIn}/>
|
<EditButton tournamentId={props.tournament.id} isOwner={props.isOwner} isSignedIn={props.isSignedIn}/>
|
||||||
|
<StatisticsButton tournamentId={props.tournament.id}/>
|
||||||
</Navbar.Brand>
|
</Navbar.Brand>
|
||||||
</Container>
|
</Container>
|
||||||
</Navbar>);
|
</Navbar>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function StatisticsButton(props) {
|
||||||
|
return (<a href={'/t/' + props.tournamentId + '/statistics'}
|
||||||
|
className='ml-3 btn btn-outline-secondary default-font-family'>
|
||||||
|
Statistiken
|
||||||
|
</a>);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function TournamentBigImage(props) {
|
function TournamentBigImage(props) {
|
||||||
return (<div className="big-image mb-0">
|
return (<div className="big-image mb-0">
|
||||||
|
|
@ -77,10 +85,10 @@ function mapStateToTournamentPageProperties(state) {
|
||||||
const TournamentPage = connect(mapStateToTournamentPageProperties)(PrivateTournamentPage);
|
const TournamentPage = connect(mapStateToTournamentPageProperties)(PrivateTournamentPage);
|
||||||
|
|
||||||
function EditButton(props) {
|
function EditButton(props) {
|
||||||
const {id, isOwner, isSignedIn} = props;
|
const {tournamentId, isOwner, isSignedIn} = props;
|
||||||
|
|
||||||
if (isSignedIn && isOwner) {
|
if (isSignedIn && isOwner) {
|
||||||
return (<a href={'/t/' + id + '/edit'} className='ml-3 btn btn-outline-secondary default-font-family'>
|
return (<a href={'/t/' + tournamentId + '/edit'} className='ml-3 btn btn-outline-secondary default-font-family'>
|
||||||
Turnier bearbeiten
|
Turnier bearbeiten
|
||||||
</a>);
|
</a>);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue