(city: string)
| 14 | }; |
| 15 | |
| 16 | export const getWeather = async (city: string) => { |
| 17 | try { |
| 18 | const { data } = await axios.get(`https://wttr.in/${city}?ATm`); |
| 19 | return data; |
| 20 | } catch (error) { |
| 21 | return error; |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | export const getQuote = async () => { |
| 26 | const { data } = await axios.get('https://api.quotable.io/random'); |