AG-420 Improve React implementation

This commit is contained in:
Sean Landsman
2017-05-25 22:15:56 +01:00
parent 1b3fc21107
commit 3226c0d6ba
11 changed files with 517 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
import React, {Component} from "react";
export default class MedalRenderer extends Component {
constructor(props) {
super(props);
this.country = this.props.node.key;
this.gold = this.props.data.gold;
this.silver = this.props.data.silver;
this.bronze = this.props.data.bronze;
}
render() {
return (
<span>{this.country} Gold: {this.gold}, Silver: {this.silver}, Bronze: {this.bronze}</span>
);
}
};