Prepare tasks todo for fetching data on Photos page
This commit is contained in:
@@ -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"]) {
|
||||
|
||||
Reference in New Issue
Block a user