izmjena algoritma
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user