From 3679ac9432e5fb289706008210bd858d98d124ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 5 Oct 2021 23:41:11 +0200 Subject: [PATCH] Prepare tasks todo for fetching data on Photos page --- .env.local | 2 ++ src/routes/photos.svelte | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.env.local b/.env.local index a9986a5..2a3c738 100644 --- a/.env.local +++ b/.env.local @@ -1,6 +1,8 @@ # Options VITE_LIMIT_TIME=2 * 7 * 24 * 60 * 60 * 1000 VITE_PREVIEW_COUNT=4 +VITE_GRID_AMOUNT=21 +VITE_GRID_INCREMENT=21 # API related # VITE_API_URL_DEV="http://192.168.1.19:8055" diff --git a/src/routes/photos.svelte b/src/routes/photos.svelte index 39fe76d..d6e70ac 100644 --- a/src/routes/photos.svelte +++ b/src/routes/photos.svelte @@ -48,6 +48,7 @@ filterCountry = value // TODO: Request photos from the country of choice + // TODO: Change URL query sort=value } // Sort select @@ -57,6 +58,7 @@ filterSort = value // TODO: Request photos sorted by the choice + // TODO: Change URL query sort=value } @@ -68,6 +70,8 @@ filterCountry = defaultCountry filterSort = defaultSort + // TODO: Change URL query sort=defaultSort and country=defaultCountry + } /** @@ -190,6 +194,7 @@ import { fetchAPI } from '$utils/api' export async function load ({ page, session, fetch, context }) { + // TODO: Implement query parameters from URL (country, sort) const res = await fetchAPI(` query { photo (limit: 11, sort: ["-date_created"]) {