(episodeId: string)
| 4 | } |
| 5 | |
| 6 | export const getEpisode = async (episodeId: string) => { |
| 7 | const res = await fetch( |
| 8 | `https://rickandmortyapi.com/api/episode/${episodeId}`, |
| 9 | ) |
| 10 | return await res.json() |
| 11 | } |
| 12 | |
| 13 | export const getCharacters = async () => { |
| 14 | const res = await fetch('https://rickandmortyapi.com/api/character/') |