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

grain.social/grain

photography-focused photo sharing platform

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

export const load: PageLoad = async ({ parent, fetch }) => {
  const { queryClient, viewer } = await parent();
  if (viewer?.did) {
    const prefetch = queryClient.prefetchQuery(forYouFeedQuery(viewer.did, FEED_PAGE_SIZE, fetch));
    if (!browser) await prefetch;
  }
};