minor updates
This commit is contained in:
@@ -40,12 +40,16 @@ class Maps extends React.Component {
|
||||
this.setState({ breakload: false })
|
||||
const mapname = this.props.match.params.mapname;
|
||||
const stage = this.props.match.params.stage;
|
||||
const mapTimes = await Facade.getMapTimesFromCache(mapname, stage, 0);
|
||||
const fetchsize = await Facade.getMapTimesFromCacheSize(mapname, stage);
|
||||
this.setState({ mapTimes });
|
||||
try {
|
||||
const mapTimes = await Facade.getMapTimesFromCache(mapname, stage, 0);
|
||||
const fetchsize = await Facade.getMapTimesFromCacheSize(mapname, stage);
|
||||
this.setState({ mapTimes });
|
||||
this.setState({ fetchsize });
|
||||
} catch (error) {
|
||||
console.log("invalid map or stage");
|
||||
}
|
||||
this.setState({ mapName: mapname })
|
||||
this.setState({ breakload: true })
|
||||
this.setState({ fetchsize });
|
||||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -83,7 +87,7 @@ class Maps extends React.Component {
|
||||
<section className="hero_single version_2 start_bg_zoom">
|
||||
<div className="wrapper">
|
||||
<div className="container">
|
||||
<h3>Map: {this.state.mapName}</h3>
|
||||
<h3>Map: {this.state.mapName}</h3>
|
||||
<p>
|
||||
Stage: {this.props.match.params.stage}
|
||||
</p>
|
||||
@@ -110,13 +114,13 @@ class Maps extends React.Component {
|
||||
<div className="item col-12 col-sm-6 col-md-4 col-lg-3 d-flex justify-content-center" key={e.steamID} id={"maps/" + e.steamID} >
|
||||
<div className="box_grid text-center">
|
||||
<NavLink to={'/player/' + e.steamID}>
|
||||
<strong className="col-lg-1 col-centered" /> SteamID: {e.steamID}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Name: {e.name}<br />
|
||||
<strong> SteamID: {e.steamID}</strong><br />
|
||||
<strong > Name: {e.name}</strong><br />
|
||||
<img src={e.avatar} alt="" /> <br />
|
||||
</NavLink>
|
||||
<strong className="col-lg-1 col-centered" /> Position: {e.position}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Mappoints: {e.mapPoint}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Time: 0{e.mapTimeMinutes}:{e.mapTimeSeconds}<br />
|
||||
<strong> Position: {e.position}</strong><br />
|
||||
<strong> Mappoints: {e.mapPoint}</strong><br />
|
||||
<strong> Time: 0{e.mapTimeMinutes}:{e.mapTimeSeconds}</strong><br />
|
||||
{Object.keys(e.badgesUrls).map(badges => (
|
||||
<div key={e.badgesUrls[badges]}>
|
||||
<img src={e.badgesUrls[badges]} alt="" /> <br />
|
||||
@@ -126,7 +130,9 @@ class Maps extends React.Component {
|
||||
</div>
|
||||
))}
|
||||
{!this.state.breakload ? <h1>
|
||||
Loading Players <br /> <br /> <LoadingIndicator />
|
||||
<LoadingIndicator />
|
||||
</h1> : this.state.fetchsize === 0 ? <h1>
|
||||
No data found
|
||||
</h1> : ""}
|
||||
</div>
|
||||
</div >
|
||||
|
||||
Reference in New Issue
Block a user