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