WIP 1.51.8: frontend on v2 for event detail, options, sections, attachments, costs, uploads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
2026-10-29 12:14:01 +02:00
co-authored by Claude Opus 5.5
parent 3c983070a1
commit 99efe7a7d0
23 changed files with 196 additions and 161 deletions
@@ -53,7 +53,7 @@ export default function ClientActions({ event }: Props) {
Save QR
</button>
<a
href={`${API_BASE}/api/events/${event.id}/ics`}
href={`${API_BASE}/api/v2/events/${event.id}/calendar.ics`}
download
className="flex items-center gap-2 px-4 py-2 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors text-sm font-medium"
>
+2 -2
View File
@@ -59,7 +59,7 @@ type Event = {
nextInSeries?: NextInSeries | null;
};
import { apiFetch, ApiError, resolveToApiOrigin } from "@/lib/api";
import { ApiError, resolveToApiOrigin, fetchEvent } from "@/lib/api";
import { ApiImage } from "@/components/shared/ApiImage";
import { formatDateTimeRange } from "@/lib/date";
import { BundleOffers } from "@/components/shared/BundleDeals";
@@ -142,7 +142,7 @@ function RegisterCta({ event }: { event: Event }) {
// request, so calling this again from the page component below is free.
async function loadEvent(id: string): Promise<Event | null> {
try {
return await apiFetch<Event>(`/api/events/${id}`, { nextOptions: { next: { revalidate } } });
return await fetchEvent<Event>(id, { nextOptions: { next: { revalidate } } });
} catch (e) {
if (e instanceof ApiError && e.status === 404) return null;
throw e;