add leader

master
lza_menace 2 years ago
parent 15a9407309
commit 64a2b8ae81

@ -138,6 +138,16 @@
background-color: rgba(0,0,0,.6); background-color: rgba(0,0,0,.6);
padding: 2px; padding: 2px;
border-radius: 4px; border-radius: 4px;
text-align: left; text-align: right;
right: 0; right: 0;
padding: .75em;
}
.nopad {
padding: 0;
margin: 0;
}
.nopad a {
color: #ff00ea;
} }

@ -128,6 +128,11 @@ class GameMap extends React.Component {
} }
} }
shorten(s) {
return s.slice(0, 6) + '...' + s.slice(-4)
}
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if ( if (
(this.props.bombSupply !== prevProps.bombSupply) || (this.props.bombSupply !== prevProps.bombSupply) ||
@ -158,8 +163,15 @@ class GameMap extends React.Component {
</div> </div>
<div id="killLeader"> <div id="killLeader">
<img src={Boomer} width="50px" /> <img src={Boomer} width="50px" />
<p>Kill Leader: {this.props.killLeader}</p> <p className="nopad">
<p>{this.props.killLeaderCount} kills</p> Kill Leader:<br />
{this.props.killLeaderCount} kills
</p>
<p className="nopad">
<a href="https://etherscan.io/address/${this.props.killLeader}" target="_blank">
{this.shorten(this.props.killLeader)}
</a>
</p>
</div> </div>
<div className="map"> <div className="map">
<img src={Map} /> <img src={Map} />
@ -345,6 +357,7 @@ function Section3() {
}) })
} }
}); });
console.log(sendBombsWrite.error?.message);
return ( return (
<section className="section" id="mintSection"> <section className="section" id="mintSection">
{isConnected && {isConnected &&

Loading…
Cancel
Save