replace redux with zustand

This commit is contained in:
2025-07-25 01:03:11 +02:00
parent 5448285211
commit 3bcd2e16a2
30 changed files with 510 additions and 534 deletions

13
src/api/kvv.ts Normal file
View File

@@ -0,0 +1,13 @@
async function fetchKvvDepartures(stopId: number) {
const API_URL = `https://projekte.kvv-efa.de/sl3-alone/XSLT_DM_REQUEST?outputFormat=JSON&coordOutputFormat=WGS84[dd.ddddd]&depType=stopEvents&locationServerActive=1&mode=direct&name_dm=${stopId}&type_dm=stop&useOnlyStops=1&useRealtime=1&limit=6&line=kvv:22301:E:H:s25&line=kvv:21012:E:H:s25&line=kvv:21012:E:R:s25&line=kvv:22305:E:H:s25`;
const data = await fetch(API_URL, {
method: "GET",
});
if (!data.ok) {
throw new Error(`HTTP error! status: ${data.status}`);
}
return data;
}
export { fetchKvvDepartures };