vendredi 30 mars 2018

Ternary Operator if else if issue

Been staring at this for days and from everything iv found it should be working but always ends up with ''. I'm checking the price change that can be positive or negative, hence the >0 <0.

 {parseInt(item.CheeseBarrelChange) > 0 ? <i className={styles.up}></i> :
 parseInt(item.CheeseBarrelChange) < 0 ? <i className={styles.down}></i>  :''} 

Aucun commentaire:

Enregistrer un commentaire