Prepare tasks todo for fetching data on Photos page

This commit is contained in:
2021-10-05 23:41:11 +02:00
parent 012dba9a6b
commit 3679ac9432
2 changed files with 7 additions and 0 deletions

View File

@@ -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"]) {