We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bea4d3 commit 0103880Copy full SHA for 0103880
example/index.tsx
@@ -38,7 +38,7 @@ const fetchStarwarsHero = async (
38
id: string,
39
abortSignal?: AbortSignal
40
): Promise<StarwarsHero> => {
41
- const result = await fetch(`https://swapi.co/api/people/${id}/`, {
+ const result = await fetch(`https://swapi.dev/api/people/${id}/`, {
42
signal: abortSignal,
43
});
44
if (result.status !== 200) {
@@ -52,7 +52,7 @@ const searchStarwarsHero = async (
52
53
): Promise<StarwarsHero[]> => {
54
const result = await fetch(
55
- `https://swapi.co/api/people/?search=${encodeURIComponent(text)}`,
+ `https://swapi.dev/api/people/?search=${encodeURIComponent(text)}`,
56
{
57
58
}
0 commit comments