diff --git a/site/content/examples/06-lifecycle/00-onmount/App.svelte b/site/content/examples/06-lifecycle/00-onmount/App.svelte index b6c3100e58f..06997161f0f 100644 --- a/site/content/examples/06-lifecycle/00-onmount/App.svelte +++ b/site/content/examples/06-lifecycle/00-onmount/App.svelte @@ -4,7 +4,7 @@ let photos = []; onMount(async () => { - const res = await fetch(`https://jsonplaceholder.typicode.com/photos?_limit=20`); + const res = await fetch(`/tutorial/api/album`); photos = await res.json(); }); diff --git a/site/content/tutorial/07-lifecycle/01-onmount/text.md b/site/content/tutorial/07-lifecycle/01-onmount/text.md index f24fce5fc21..6baa254e9f2 100644 --- a/site/content/tutorial/07-lifecycle/01-onmount/text.md +++ b/site/content/tutorial/07-lifecycle/01-onmount/text.md @@ -15,7 +15,7 @@ We'll add an `onMount` handler that loads some data over the network: let photos = []; onMount(async () => { - const res = await fetch(`https://jsonplaceholder.typicode.com/photos?_limit=20`); + const res = await fetch(`/tutorial/api/album`); photos = await res.json(); });