Adding title for double assets ribbon.

logins
Thomas Hintz 5 years ago
parent 6118398bf5
commit 1dc5d53f0d

@ -181,7 +181,9 @@ class ResourceUnit extends React.Component {
{this.props.img ? (<img src={this.props.img} />) : (<Fragment />)}
{this.props.children}
{this.props.doubled ? (
<div className="resource-doubled">
<div className="resource-doubled"
title={this.props.doubled + ' harvests are doubled this year!'}
>
<FontAwesomeIcon icon={faAward} />
</div>
) : (<></>)}
@ -252,13 +254,13 @@ class PlayerResources extends React.Component {
<div className='resource-unit-container'>
<ResourceUnit img={HayImg} h='120' s='100' label='acres of Hay'
amount={player.assets.hay}
doubled={player.hayDoubled}
doubled={player.hayDoubled && 'Hay'}
>
{player.assets.hay}
</ResourceUnit> {' '}
<ResourceUnit img={WheatImg} h='41' s='100' label='acres of Grain'
amount={player.assets.grain}
doubled={player.cornDoubled}
doubled={player.cornDoubled && 'Corn'}
>
{player.assets.grain}
</ResourceUnit> {' '}

Loading…
Cancel
Save