mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 19:03:47 +00:00
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:
committed by
Carlos Valente
parent
ed93cf313a
commit
048a9c96ea
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user