web: adopt Cache Components, Partial Prefetching and ensureStatic
web / ci (push) Successful in 2m2s

This commit is contained in:
ponas committed 2026-10-13 23:59:14 +02:00
1 parent 3a0c2fd82b
commit db286434ba
70 files changed
+1285 -316

No files matched your search

+2 -3
View File
@@ -1,6 +1,6 @@
import { graphql } from "@/gql";
import { VenueFragment, VenueIndexFragment } from "@/gql/graphql";
import { getClient } from "@/app/client";
import { cmsQuery } from "@/app/client";
import { PageContent } from "@/components/general/PageContent";
import { PageHeader } from "@/components/general/PageHeader";
import { VenueList } from "@/components/venues/VenueList";
@@ -77,8 +77,7 @@ export type VenueIndexViewProps = {
export async function loadVenueIndexProps(overrides?: {
indexOverride?: VenueIndexFragment;
}): Promise<VenueIndexViewProps> {
const { data, error } = await getClient().query(venueIndexQuery, {});
if (error) throw new Error(error.message);
const data = await cmsQuery(venueIndexQuery, {});
const index = overrides?.indexOverride ?? (data?.index as VenueIndexFragment | undefined);
if (!index) throw new Error("Failed to load /lokaler");
const venues = (data?.venues ?? []) as VenueFragment[];