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 - - - - - Issue #3 - - Adding Occitanie region to the mix! - 24/08/2020 - - - - - - - - - Issue #3 - - Adding Occitanie region to the mix! - 24/08/2020 - - - - - - - - - Issue #3 - - Adding Occitanie region to the mix! - 24/08/2020 - - - - + {#each issues as { issue, title, date_sent, link, thumbnail: { id } }} + + + + + Issue #{issue} + + {title} + {dayjs(date_sent).format('DD/MM/YYYY')} + + + + + {/each} - - - - - - - @@ -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, } } }
Adding Occitanie region to the mix!
{title}