From 73840883889f6f2d85a4e4cca6fd5a50eda89437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Fri, 15 Oct 2021 22:34:36 +0200 Subject: [PATCH] Use Newsletter data from API --- src/routes/subscribe.svelte | 76 ++++++++++++------------------------- 1 file changed, 24 insertions(+), 52 deletions(-) diff --git a/src/routes/subscribe.svelte b/src/routes/subscribe.svelte index c6e86c5..67a95e7 100644 --- a/src/routes/subscribe.svelte +++ b/src/routes/subscribe.svelte @@ -1,11 +1,11 @@

Past Issues

- -
-
- - -
-
@@ -76,11 +47,12 @@ export async function load ({ page, fetch, session, stuff }) { const res = await fetchAPI(` query { - photo (limit: 11, sort: ["-date_created"]) { - image { - id - title - } + newsletter (limit: -1, sort: "-issue") { + issue + title + date_sent + link + thumbnail { id } } } `) @@ -89,7 +61,7 @@ return { props: { - photos: data.photo, + issues: data.newsletter, } } }