(characterId: string)
| 16 | } |
| 17 | |
| 18 | export const getCharacter = async (characterId: string) => { |
| 19 | const res = await fetch( |
| 20 | `https://rickandmortyapi.com/api/character/${characterId}`, |
| 21 | ) |
| 22 | return await res.json() |
| 23 | } |
| 24 | |
| 25 | export const getLocation = async (locationId: string) => { |
| 26 | const res = await fetch( |