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

Loading…
Cancel
Save