WIP 1.51.13: kids check-in and volunteers on v2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { apiFetch } from "@/lib/api";
|
||||
import { formatDate } from "@/lib/date";
|
||||
import type { KidsEvent } from "@/lib/kids";
|
||||
import { apiV2Data } from "@/lib/apiV2";
|
||||
|
||||
type Props = {
|
||||
token: string | null;
|
||||
@@ -21,7 +21,7 @@ export function KidsEventPicker({ token, eventId, sessionId, onChange }: Props)
|
||||
|
||||
useEffect(() => {
|
||||
if (!token) return;
|
||||
apiFetch<KidsEvent[]>("/api/kids/events", { authToken: token })
|
||||
(apiV2Data("get", "/kids/events", { authToken: token }) as Promise<KidsEvent[]>)
|
||||
.then(list => {
|
||||
setEvents(list);
|
||||
if (eventId || !list.length) return;
|
||||
|
||||
Reference in New Issue
Block a user