stats and other tings

This commit is contained in:
ntr
2019-05-31 16:23:34 +10:00
parent d6a3ca2eb4
commit a074677ed6
4 changed files with 25 additions and 31 deletions
+10 -13
View File
@@ -183,7 +183,15 @@ function Construct(props) {
const stats = Object.keys(STATS).map(s => {
const stat = STATS[s];
return <figure key={stat.stat} alt={stat.stat} className={stat.stat}>
const info = (s === 'Speed' && 'Speed')
|| (s.includes('Power') && 'Power')
|| (s.includes('Life') && 'Life');
return <figure key={stat.stat}
alt={stat.stat}
className={stat.stat}
onMouseOver={e => hoverInfo(e, info)} >
{shapes[s]()}
<figcaption>{construct[stat.stat].value}</figcaption>
</figure>;
@@ -203,18 +211,7 @@ function Construct(props) {
{specs}
</div>
<div className="stats">
<div className="damage-label label">
Power
</div>
<div className="speed-label label">
Speed
</div>
<div className="life-label label">
Life
</div>
<div className="icons">
{stats}
</div>
{stats}
</div>
</div>
);
-2
View File
@@ -35,8 +35,6 @@ function Main(props) {
return <Instance />;
}
console.warn('nav', nav, instance, game)
if (nav === 'team') return <Team />;
if (nav === 'list') return <List />;