|
@@ -1,5 +1,6 @@
|
|
|
import React from "react";
|
|
|
import ConfirmBattle from "../components/ConfirmBattle";
|
|
|
+import githubHelpers from "../utils/githubHelpers";
|
|
|
|
|
|
class ConfirmBattleContainer extends React.Component {
|
|
|
constructor(props) {
|
|
@@ -19,10 +20,13 @@ class ConfirmBattleContainer extends React.Component {
|
|
|
console.log("componentDidMount");
|
|
|
const query = this.props.location.query;
|
|
|
|
|
|
- this.setState({
|
|
|
- isLoading: true
|
|
|
- });
|
|
|
- setTimeout(() => { this.setState({ isLoading: false }); }, 2000);
|
|
|
+ githubHelpers.getPlayersInfo([query.playerOne, query.playerTwo])
|
|
|
+ .then((info) => {
|
|
|
+ this.setState({
|
|
|
+ isLoading: false,
|
|
|
+ playerInfo: info
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps() {
|