mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 10:53:51 +00:00
refactor: extract studio data to hook
This commit is contained in:
committed by
Carlos Valente
parent
ad7f658f15
commit
bea7e2bb2b
@@ -256,3 +256,16 @@ export const useBackstageSocket = createSelector((state: RuntimeStore) => ({
|
||||
selectedEventId: state.eventNow?.id ?? null,
|
||||
time: state.timer,
|
||||
}));
|
||||
|
||||
export const useStudioClockSocket = createSelector((state: RuntimeStore) => ({
|
||||
clock: state.clock,
|
||||
playback: state.timer.playback,
|
||||
}));
|
||||
|
||||
export const useStudioTimersSocket = createSelector((state: RuntimeStore) => ({
|
||||
eventNext: state.eventNext,
|
||||
eventNow: state.eventNow,
|
||||
message: state.message,
|
||||
time: state.timer,
|
||||
runtime: state.runtime,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user