now i just need the new machine to install everything for deloyment
This commit is contained in:
@@ -49,13 +49,13 @@ class Player extends React.Component {
|
||||
window.removeEventListener("scroll", this.scrollListener);
|
||||
}
|
||||
|
||||
findSecondLast(array) {
|
||||
return array[array.length - 2];
|
||||
findLateIndex(array) {
|
||||
return array[array.length - 5];
|
||||
}
|
||||
|
||||
handleScroll = () => {
|
||||
if (this.state.breakload && this.state.player.Times > this.state.mapTimes.length) {
|
||||
const map = this.findSecondLast(this.state.mapTimes);
|
||||
const map = this.findLateIndex(this.state.mapTimes);
|
||||
var lastLi = document.getElementById("playermaps/" + map.mapname + "/" + map.mapstage);
|
||||
var lastLiOffset = lastLi.offsetTop + lastLi.clientHeight;
|
||||
var pageOffset = window.pageYOffset + window.innerHeight;
|
||||
@@ -84,38 +84,43 @@ class Player extends React.Component {
|
||||
));
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="alert alert-primary" >
|
||||
<div id='containerMaps'>
|
||||
<div>
|
||||
<NavLink to={'/leaderboard/'}>
|
||||
<h3> <strong className="col-lg-1 col-centered" /> leaderboard<br /> </h3>
|
||||
</NavLink>
|
||||
</div>
|
||||
<div>
|
||||
<NavLink to={'/mapboard/'}>
|
||||
<h3> <strong className="col-lg-1 col-centered" /> MapBoard<br /> </h3>
|
||||
</NavLink>
|
||||
<section className="hero_single version_2 start_bg_zoom">
|
||||
<div className="wrapper">
|
||||
<div className="container">
|
||||
<h3>Player Profile: {this.state.player.name}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div className="tickets-block" style={{ background_color: "#393f47" }}>
|
||||
<div className="container-fluid">
|
||||
<p className="text-center ">
|
||||
<NavLink to={'/mapboard/'}>
|
||||
<b>MapBoard</b>
|
||||
</NavLink>
|
||||
</p>
|
||||
<p className="text-center ">
|
||||
<NavLink to={'/leaderboard/'}>
|
||||
<b>leaderboard</b>
|
||||
</NavLink>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="container mm" style={{ marginTop: "85px" }}>
|
||||
<div style={{
|
||||
position: 'absolute', left: '50%', top: '30%'
|
||||
}}>
|
||||
<div>
|
||||
<a href={"http://steamcommunity.com/profiles/" + this.state.player.steamID64}>
|
||||
<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 />
|
||||
{badges}
|
||||
<br />
|
||||
<br />
|
||||
</a>
|
||||
{this.state.mapTimes.map(e => (
|
||||
<li key={"mapkey/" + e.mapname + "/" + e.mapstage} id={"playermaps/" + e.mapname + "/" + e.mapstage}>
|
||||
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', }}>
|
||||
<a href={"http://steamcommunity.com/profiles/" + this.state.player.steamID64}>
|
||||
<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 />
|
||||
{badges}
|
||||
</a>
|
||||
</div>
|
||||
<div className="container mm">
|
||||
<div className="row">
|
||||
{this.state.mapTimes.map(e => (
|
||||
<div className="item" key={"playermapkey/" + e.mapname + "/" + e.mapstage} id={"playermaps/" + e.mapname + "/" + e.mapstage}>
|
||||
<div className="box_grid">
|
||||
<NavLink to={'/map/' + e.mapname + "/" + e.mapstage}>
|
||||
<strong className="col-lg-1 col-centered" /> Map: {e.mapname}<br />
|
||||
<strong className="col-lg-1 col-centered" /> Stage: {e.mapstage}<br />
|
||||
@@ -125,18 +130,16 @@ class Player extends React.Component {
|
||||
<br />
|
||||
<br />
|
||||
</NavLink>
|
||||
</li>
|
||||
))}
|
||||
{!this.state.breakload ? <h1>
|
||||
Loading Stats <br /> <br /> <LoadingIndicator />
|
||||
</h1> : ""}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
{!this.state.breakload ? <h1>
|
||||
Loading Stats <br /> <br /> <LoadingIndicator />
|
||||
</h1> : ""}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default Player;
|
||||
Reference in New Issue
Block a user