adds lists and trails to profile
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
async function handleFilterUpdate() {
|
||||
loading = true;
|
||||
const response = await trails_search_filter(filter, pagination.page);
|
||||
trails = response.trails;
|
||||
trails = response.items;
|
||||
pagination.page = response.page;
|
||||
pagination.totalPages = response.totalPages;
|
||||
loading = false;
|
||||
@@ -37,7 +37,7 @@
|
||||
async function paginate(page: number) {
|
||||
pagination.page = page;
|
||||
const response = await trails_search_filter(filter, page);
|
||||
trails = response.trails;
|
||||
trails = response.items;
|
||||
$page.url.searchParams.set("page", page.toString());
|
||||
goto(`?${$page.url.searchParams.toString()}`);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Trail, TrailFilter } from "$lib/models/trail";
|
||||
import type { TrailFilter } from "$lib/models/trail";
|
||||
import { categories_index } from "$lib/stores/category_store";
|
||||
import { trails_get_filter_values, trails_search_filter } from "$lib/stores/trail_store";
|
||||
import { trails_get_filter_values } from "$lib/stores/trail_store";
|
||||
import type { ServerLoad } from "@sveltejs/kit";
|
||||
|
||||
export const load: ServerLoad = async ({ params, locals, url, fetch }) => {
|
||||
|
||||
Reference in New Issue
Block a user