fix space indentation
This commit is contained in:
@@ -4,30 +4,33 @@ import type { DepartureType } from "@/types/departureType";
|
||||
import { devtools } from "zustand/middleware";
|
||||
|
||||
const useKVVStore = create(
|
||||
devtools((set) => ({
|
||||
pStreet: [] as DepartureType[],
|
||||
hStreet: [] as DepartureType[],
|
||||
fetch: async () => {
|
||||
const hStreetStopId = 7000044;
|
||||
const pStreetStopId = 7000045;
|
||||
const hStreetData = await fetchKvvDepartures(hStreetStopId);
|
||||
const pStreetData = await fetchKvvDepartures(pStreetStopId);
|
||||
const hStreetJson = await hStreetData.json();
|
||||
const pStreetJson = await pStreetData.json();
|
||||
devtools(
|
||||
(set) => ({
|
||||
pStreet: [] as DepartureType[],
|
||||
hStreet: [] as DepartureType[],
|
||||
fetch: async () => {
|
||||
const hStreetStopId = 7000044;
|
||||
const pStreetStopId = 7000045;
|
||||
const hStreetData = await fetchKvvDepartures(hStreetStopId);
|
||||
const pStreetData = await fetchKvvDepartures(pStreetStopId);
|
||||
const hStreetJson = await hStreetData.json();
|
||||
const pStreetJson = await pStreetData.json();
|
||||
|
||||
console.log("KVV departures fetched:", {
|
||||
hStreet: hStreetJson,
|
||||
pStreet: pStreetJson,
|
||||
});
|
||||
console.log("KVV departures fetched:", {
|
||||
hStreet: hStreetJson,
|
||||
pStreet: pStreetJson,
|
||||
});
|
||||
|
||||
set({
|
||||
hStreet: hStreetJson as DepartureType[],
|
||||
pStreet: pStreetJson as DepartureType[],
|
||||
});
|
||||
},
|
||||
}), {
|
||||
name: "kvv-store",
|
||||
}),
|
||||
set({
|
||||
hStreet: hStreetJson as DepartureType[],
|
||||
pStreet: pStreetJson as DepartureType[],
|
||||
});
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: "kvv-store",
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
export { useKVVStore };
|
||||
|
||||
Reference in New Issue
Block a user