Properly style the buttons on the tournament and its statistics

This commit is contained in:
Jonny 2019-05-02 08:42:50 +02:00 committed by JP1998
parent 3bc7768bec
commit d857a4e159
2 changed files with 41 additions and 6 deletions

View File

@ -2,6 +2,7 @@ import Head from 'next/head';
import React from 'react'; import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { import {
Button,
Card, Card,
CardBody, CardBody,
Container, Container,
@ -290,6 +291,6 @@ const TournamentInformationView = connect(
class TournamentButton extends React.Component { class TournamentButton extends React.Component {
render() { render() {
const { id } = this.props; const { id } = this.props;
return <a href={'/t/' + id} className='btn btn-outline-secondary'>Zum Turnier</a>; return <Button href={'/t/' + id} outline color='secondary'>Zum Turnier</Button>;
} }
} }

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
import Head from 'next/head'; import Head from 'next/head';
import React from 'react'; import React from 'react';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
@ -9,6 +10,39 @@ import {TurniereNavigation} from '../js/components/Navigation';
import {BigImage} from '../js/components/BigImage'; import {BigImage} from '../js/components/BigImage';
import {getState} from '../js/api'; import {getState} from '../js/api';
import {getRequest} from '../js/redux/backendApi'; import {getRequest} from '../js/redux/backendApi';
=======
import Head from 'next/head';
import React from 'react';
import { connect } from 'react-redux';
import {
Button,
ButtonGroup,
Card,
CardBody,
Col,
Container,
Input,
InputGroup,
InputGroupAddon,
ListGroup,
ListGroupItem,
Modal,
ModalBody,
ModalFooter,
ModalHeader,
Row,
Table
} from 'reactstrap';
import { ErrorPageComponent } from '../js/components/ErrorComponents';
import { Footer } from '../js/components/Footer';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import {
getRequest,
getState
} from '../js/api';
>>>>>>> Properly style the buttons on the tournament and its statistics
import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap/dist/css/bootstrap.min.css';
@ -53,18 +87,18 @@ const TournamentPage = connect(mapStateToTournamentPageProperties)(PrivateTourna
function ButtonsBadge(props) { function ButtonsBadge(props) {
const { id, ownerName, isSignedIn, username } = props; const { id, ownerName, isSignedIn, username } = props;
return ( return (
<div> <ButtonGroup>
<EditButton id={id} ownerName={ownerName} isSignedIn={isSignedIn} username={username}/> <EditButton id={id} ownerName={ownerName} isSignedIn={isSignedIn} username={username}/>
<StatisticsButton id={id}/> <StatisticsButton id={id}/>
</div> </ButtonGroup>
); );
} }
function EditButton(props) { function EditButton(props) {
const {id, ownerName, isSignedIn, username} = props; const {id, ownerName, isSignedIn, username} = props;
if (isSignedIn && ownerName === username) { if(isSignedIn && ownerName === username) {
return (<a href={'/t/' + id + '/edit'} className='btn btn-outline-secondary'>Turnier bearbeiten</a>); return (<Button href={'/t/' + id + '/edit'} outline color='secondary'>Turnier bearbeiten</Button>);
} else { } else {
return null; return null;
} }
@ -72,7 +106,7 @@ function EditButton(props) {
function StatisticsButton(props) { function StatisticsButton(props) {
const { id } = props; const { id } = props;
return <a href={'/t/' + id + '/statistics'} className='btn btn-outline-secondary'>Statistiken zum Turnier</a>; return <Button href={'/t/' + id + '/statistics'} outline color='secondary'>Statistiken zum Turnier</Button>;
} }
function getLevelName(levelNumber) { function getLevelName(levelNumber) {