I'm not particularly well-versed in coding, I've just been tinkering around with some files as a learning experience. I've managed to implement a Favorite sort, and now I'm attempting to show an icon on the Pokémon card if the Pokémon is favorited.
So far, I've implemented this in pokemon.scss with the following addition:
However, this displays an icon on every Pokémon card as well as a binary integer denoting whether the Pokémon is favorited or not. I need to implemenet an IF statement somewhere which will display the favorite icon only if the Pokémon is favorited (e.g. 'if favorite != 0') but I'm not familiar enough with the syntax to know how to implement this.
I'm not particularly well-versed in coding, I've just been tinkering around with some files as a learning experience. I've managed to implement a Favorite sort, and now I'm attempting to show an icon on the Pokémon card if the Pokémon is favorited.
So far, I've implemented this in pokemon.scss with the following addition:
However, this displays an icon on every Pokémon card as well as a binary integer denoting whether the Pokémon is favorited or not. I need to implemenet an IF statement somewhere which will display the favorite icon only if the Pokémon is favorited (e.g. 'if favorite != 0') but I'm not familiar enough with the syntax to know how to implement this.