mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
Extract client timeuntil logic (#1521)
* extract * add to timeline * translate Due * fix timeline page * begin adding some tests * spelling Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> * move file * refactor * create hook * refactor * update test * spelling Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> * remove translation * explain isLinkedToLoaded * add delay to calculation * add delay value to test * spelling --------- Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b60b1beeec
commit
99dd4b4d5c
@@ -170,6 +170,12 @@ export const useTimelineStatus = createSelector((state: RuntimeStore) => ({
|
||||
offset: state.runtime.offset,
|
||||
}));
|
||||
|
||||
export const useTimeUntilData = createSelector((state: RuntimeStore) => ({
|
||||
clock: state.clock,
|
||||
offset: state.runtime.offset,
|
||||
currentDay: state.eventNow?.dayOffset ?? 0, //The day of the currently running event
|
||||
}));
|
||||
|
||||
export const useRuntimeOffset = createSelector((state: RuntimeStore) => ({
|
||||
offset: state.runtime.offset,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user