~ knotless Search/
↑↓ move↵ open⇧↵ all results

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2
11 lines · 466 B Raw History
import { browser } from "$app/environment";
import { cameraFeedInfiniteQuery } from "$lib/queries";
import type { PageLoad } from "./$types";

export const load: PageLoad = async ({ params, parent, fetch }) => {
  const camera = decodeURIComponent(params.name);
  const { queryClient } = await parent();
  const prefetch = queryClient.prefetchInfiniteQuery(cameraFeedInfiniteQuery(camera, fetch));
  if (!browser) await prefetch;
  return { camera, wide: true };
};