Created
April 22, 2021 19:48
-
-
Save karlguillotte/a8383c81e79e2fbffa4cdf30c7e77aef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = 'https://assets.avalanche.ca/images/' | |
const iconURLs = new Map([ | |
['fall', PATH + 'early_season_icon.svg'], | |
['spring', PATH + 'spring_situation_icon.svg'], | |
['summer', PATH + 'summer_conditions_icon.svg'], | |
]) | |
const src = IconURLs.get(payload.season.value) // payload is https://api.avalanche.ca/forecasts/fr/products/chic-chocs | |
<img src={src} alt='' /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment