Refactor: split runtime state (#1725)

* refactor: runtime types

* refactor: runtimeState functions to use the split type

* refactor: RuntimeService to use the new split data

* refactor: use the split data in the UI

* update comments

* refactor: rename runtime to offset

* fix utils test
This commit is contained in:
Alex Christoffer Rasmussen
2025-08-14 19:29:25 +02:00
committed by Carlos Valente
parent ed93cf313a
commit 048a9c96ea
26 changed files with 400 additions and 518 deletions
+2 -2
View File
@@ -145,12 +145,12 @@ export function useTimeUntilExpectedStart(
isLinkedToLoaded: boolean;
},
): number {
const { offset, currentDay, offsetMode, actualStart, plannedStart, clock } = useExpectedStartData();
const { offset, currentDay, mode, actualStart, plannedStart, clock } = useExpectedStartData();
if (event === null) return 0;
const expectedStart = getExpectedStart(
{ ...event },
{ ...state, currentDay, offset, offsetMode, actualStart, plannedStart },
{ ...state, currentDay, offset, mode, actualStart, plannedStart },
);
return expectedStart - clock;
}