Prepare tasks todo for fetching data on Photos page
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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