izmjena algoritma

This commit is contained in:
GotPPay
2017-10-25 00:28:31 +02:00
parent 4c4b1fe135
commit 4f9caa4dc6
5 changed files with 188 additions and 53 deletions

View File

@@ -3,14 +3,14 @@ import React, { Component } from 'react';
export default class PairComponent extends Component{
constructor(props) {
super(props);
this.state = {pairName: this.props.pair};
this.state = {pairName: this.props.pair, index: this.props.index};
}
render(){
return (
<div>
<div className = "horizontalDiv">
<div>{this.state.pairName.name1} - {this.state.pairName.name2}</div>
<div>{this.state.index+1}. {this.state.pairName.name1} - {this.state.pairName.name2}</div>
</div>
</div>
)