Add TimeToLeave feature checklist and plan (50)

Add TimeToLeave feature checklist and plan
This commit is contained in:
2026-05-12 13:17:17 +02:00
parent eac4f6e216
commit 1851d2ed47
45 changed files with 2234 additions and 259 deletions
+17
View File
@@ -56,6 +56,23 @@ export class ApiClient {
return res.json();
}
async getWalkRoute(
fromLat: number,
fromLng: number,
toLat: number,
toLng: number,
): Promise<BikeRoute> {
const url = buildUrl(this.baseUrl, "/api/walk-route", {
fromLat: String(fromLat),
fromLng: String(fromLng),
toLat: String(toLat),
toLng: String(toLng),
});
const res = await fetch(url);
if (!res.ok) throw new Error(`Walk route failed: ${res.status}`);
return res.json();
}
async fetchCalendar(url: string, days?: number): Promise<CalendarEvent[]> {
const params: Record<string, string> = { url };
if (days) params.days = String(days);