-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented aside section to hold the information received from the a…
…pi call
- Loading branch information
1 parent
b899a56
commit 11c636c
Showing
10 changed files
with
132 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import clear from "../assets/Clear.png"; | ||
import hail from "../assets/Hail.png"; | ||
import heavyCloud from "../assets/HeavyCloud.png"; | ||
import lightCloud from "../assets/LightCloud.png"; | ||
import heavyRain from "../assets/HeavyRain.png"; | ||
import lightRain from "../assets/LightRain.png"; | ||
import shower from "../assets/Shower.png"; | ||
import sleet from "../assets/Sleet.png"; | ||
import snow from "../assets/Snow.png"; | ||
import thunderstorm from "../assets/Thunderstorm.png"; | ||
|
||
const showWeatherImage = (image: string) => { | ||
switch (image) { | ||
case "sn": | ||
return snow; | ||
case "sl": | ||
return sleet; | ||
case "h": | ||
return hail; | ||
case "t": | ||
return thunderstorm; | ||
case "hr": | ||
return heavyRain; | ||
case "lr": | ||
return lightRain; | ||
case "s": | ||
return shower; | ||
case "hc": | ||
return heavyCloud; | ||
case "lc": | ||
return lightCloud; | ||
case "c": | ||
return clear; | ||
default: | ||
return clear; | ||
} | ||
}; | ||
|
||
export default showWeatherImage; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.