Merge pull request #15 from turniere/ticket/TURNIERE-138
Ticket/turniere 138
This commit is contained in:
commit
4490cd0774
|
|
@ -15,7 +15,7 @@ $ git clone https://github.com/turniere/turniere-frontend.git
|
|||
Afterwards you'll have to install the used libraries using following command:
|
||||
|
||||
```
|
||||
yarn install
|
||||
$ yarn install
|
||||
```
|
||||
|
||||
Afterwards you may simply run the developer version of the project:
|
||||
|
|
|
|||
|
|
@ -31,14 +31,9 @@ class LoginErrorList extends React.Component {
|
|||
const { error, errorMessages } = this.props;
|
||||
if(error) {
|
||||
return (
|
||||
<ul>
|
||||
<ul className='text-danger mt-3'>
|
||||
{ errorMessages.map((message, index) =>
|
||||
<li key={index}>
|
||||
<style jsx>{`
|
||||
li {
|
||||
color:red;
|
||||
}
|
||||
`}</style>
|
||||
{message}
|
||||
</li>
|
||||
|
||||
|
|
|
|||
|
|
@ -226,9 +226,9 @@ class CreateTournamentForm extends React.Component {
|
|||
}
|
||||
|
||||
createTeamArray(teamnames) {
|
||||
var result = [];
|
||||
let result = [];
|
||||
|
||||
for(var i = 0; i < teamnames.length; i++) {
|
||||
for(let i = 0; i < teamnames.length; i++) {
|
||||
result[i] = { 'name': teamnames[i] };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,17 +69,11 @@ class RegisterErrorList extends React.Component {
|
|||
const { error, errorMessages } = this.props;
|
||||
if(error) {
|
||||
return (
|
||||
<ul>
|
||||
<ul className='text-danger mt-3'>
|
||||
{ errorMessages.map((message, index) =>
|
||||
<li key={index}>
|
||||
<style jsx>{`
|
||||
li {
|
||||
color:red;
|
||||
}
|
||||
`}</style>
|
||||
{message}
|
||||
</li>
|
||||
|
||||
) }
|
||||
</ul>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ class EditTeamNamesForm extends React.Component {
|
|||
}
|
||||
|
||||
handleNameInput(index, input) {
|
||||
var team = this.state.teams.slice();
|
||||
let team = this.state.teams.slice();
|
||||
|
||||
team[index].name = input.target.value;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class PrivateTournamentPage extends React.Component {
|
|||
</Container>
|
||||
<div className='stages pt-5'>
|
||||
{playoffStages.map(stage =>
|
||||
<Stage isSignedIn={isSignedIn} isOwner={username == ownerUsername} level={getLevelName(stage.level)} matches={stage.matches} key={stage.level}/>)}
|
||||
<Stage isSignedIn={isSignedIn} isOwner={username === ownerUsername} level={getLevelName(stage.level)} matches={stage.matches} key={stage.level}/>)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -363,17 +363,17 @@ function convertGroup(apiGroup) {
|
|||
}
|
||||
|
||||
function convertMatch(apiMatch) {
|
||||
var result = {
|
||||
let result = {
|
||||
id: apiMatch.id,
|
||||
state: apiMatch.state
|
||||
};
|
||||
|
||||
if(apiMatch.match_scores.length == 2) {
|
||||
if(apiMatch.match_scores.length === 2) {
|
||||
result.team1 = apiMatch.match_scores[0].team.name;
|
||||
result.scoreTeam1 = apiMatch.match_scores[0].points;
|
||||
result.team2 = apiMatch.match_scores[1].team.name;
|
||||
result.scoreTeam2 = apiMatch.match_scores[1].points;
|
||||
} else if(apiMatch.match_scores.length == 1) {
|
||||
} else if(apiMatch.match_scores.length === 1) {
|
||||
result.team1 = apiMatch.match_scores[0].team.name;
|
||||
result.scoreTeam1 = apiMatch.match_scores[0].points;
|
||||
result.team2 = 'TBD';
|
||||
|
|
@ -424,7 +424,7 @@ class Main extends React.Component {
|
|||
|
||||
const { status, tournament } = this.state;
|
||||
|
||||
if (status == 200) {
|
||||
if (status === 200) {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
|
|
|
|||
Loading…
Reference in New Issue