upgrade to tamagui v2 and guest pwa overhaul

This commit is contained in:
Codex Agent
2026-02-02 13:01:20 +01:00
parent 6bc73637b1
commit f161366119
168 changed files with 47462 additions and 8914 deletions

View File

@@ -0,0 +1,26 @@
import { fetchJson } from './apiClient';
import { getDeviceId } from '../lib/device';
export type TaskItem = Record<string, unknown>;
type TaskResponse = {
data?: TaskItem[];
};
export async function fetchTasks(eventToken: string, options: { locale?: string; page?: number; perPage?: number } = {}) {
const params = new URLSearchParams();
if (options.locale) params.set('locale', options.locale);
if (options.page) params.set('page', String(options.page));
if (options.perPage) params.set('per_page', String(options.perPage));
const response = await fetchJson<TaskResponse>(
`/api/v1/events/${encodeURIComponent(eventToken)}/tasks${params.toString() ? `?${params.toString()}` : ''}`,
{
headers: {
'X-Device-Id': getDeviceId(),
},
}
);
return response.data?.data ?? [];
}