initial commit for having a backup
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import React from 'react';
|
||||
import Facade from '../Datafacade/datafacade';
|
||||
|
||||
class Maps extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
mapTimes: [],
|
||||
mapName: '',
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount = async () => {
|
||||
const mapname = this.props.match.params.mapname;
|
||||
const stage = this.props.match.params.stage;
|
||||
const mapTimes = await Facade.getMapTimes(mapname, stage);
|
||||
this.setState({ mapTimes });
|
||||
this.setState({ mapName: mapname })
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="container mm" style={{ marginTop: "85px" }}>
|
||||
<div style={{
|
||||
position: 'absolute', left: '50%', top: '30%'
|
||||
}}>
|
||||
|
||||
<div>
|
||||
<strong class="col-lg-1 col-centered" />{this.state.mapName}<br />
|
||||
<br />
|
||||
<br />
|
||||
{this.state.mapTimes.map(e => (
|
||||
<div>
|
||||
<strong class="col-lg-1 col-centered" /> Position: {e.position}<br />
|
||||
<strong class="col-lg-1 col-centered" /> SteamID: {e.steamID}<br />
|
||||
<strong class="col-lg-1 col-centered" /> Name: {e.name}<br />
|
||||
<strong class="col-lg-1 col-centered" /> Mappoints: {e.mapPoint}<br />
|
||||
<strong class="col-lg-1 col-centered" /> Time: 0{e.mapTimeMinutes}:{e.mapTimeSeconds}<br />
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
))}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default Maps;
|
||||
Reference in New Issue
Block a user