just making sure to have a backup online
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
import React from 'react';
|
||||
import Facade from '../Datafacade/datafacade';
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
class Player extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
player: {},
|
||||
mapTimes: []
|
||||
mapTimes: [],
|
||||
breakload: true,
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount = async () => {
|
||||
const steamid = this.props.match.params.steamid;
|
||||
const player = await Facade.getPlayer(steamid);
|
||||
const mapTimes = await Facade.getPlayerTimes(steamid);
|
||||
const player = await Facade.getPlayerFromCache(steamid);
|
||||
const mapTimes = await Facade.getPlayerTimesFromCache(steamid);
|
||||
this.setState({ player });
|
||||
this.setState({ mapTimes });
|
||||
};
|
||||
@@ -28,25 +29,25 @@ class Player extends React.Component {
|
||||
}}>
|
||||
<div>
|
||||
<a href={"http://steamcommunity.com/profiles/" + this.state.player.steamID64}>
|
||||
<strong class="col-lg-1 col-centered" /> {this.state.player.steamID}<br />
|
||||
<strong class="col-lg-1 col-centered" />{this.state.player.name}<br />
|
||||
<img src={this.state.player.Avatar} /> <br />
|
||||
<strong class="col-lg-1 col-centered" />Rank: {this.state.player.Rank}<br />
|
||||
<strong class="col-lg-1 col-centered" />Points: {this.state.player.PlayerPoints}<br />
|
||||
<strong class="col-lg-1 col-centered" />Times: {this.state.player.Times}<br />
|
||||
<strong className="col-lg-1 col-centered" /> {this.state.player.steamID}<br />
|
||||
<strong className="col-lg-1 col-centered" />{this.state.player.name}<br />
|
||||
<img src={this.state.player.Avatar} alt="" /> <br />
|
||||
<strong className="col-lg-1 col-centered" />Rank: {this.state.player.Rank}<br />
|
||||
<strong className="col-lg-1 col-centered" />Points: {this.state.player.PlayerPoints}<br />
|
||||
<strong className="col-lg-1 col-centered" />Times: {this.state.player.Times}<br />
|
||||
<br />
|
||||
<br />
|
||||
</a>
|
||||
{this.state.mapTimes.map(e => (
|
||||
<div>
|
||||
<div key={"mapkey/" + e.mapname + "/" + e.mapstage}>
|
||||
<NavLink to={'/map/' + e.mapname + "/" + e.mapstage}>
|
||||
<strong class="col-lg-1 col-centered" /> Map: {e.mapname}<br />
|
||||
<strong class="col-lg-1 col-centered" /> Stage: {e.mapstage}<br />
|
||||
<strong class="col-lg-1 col-centered" /> Position: {e.position}<br />
|
||||
<strong class="col-lg-1 col-centered" /> Time: 0{e.mapTimeMinutes}:{e.mapTimeSeconds}<br />
|
||||
<strong class="col-lg-1 col-centered" /> MapPoints: {e.mapPoint}<br />
|
||||
<br />
|
||||
<br />
|
||||
<strong className="col-lg-1 col-centered" /> Map: {e.mapname}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Stage: {e.mapstage}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Position: {e.position}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Time: 0{e.mapTimeMinutes}:{e.mapTimeSeconds}<br />
|
||||
<strong className="col-lg-1 col-centered" /> MapPoints: {e.mapPoint}<br />
|
||||
<br />
|
||||
<br />
|
||||
</NavLink>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user