refactor: extract studio data to hook

This commit is contained in:
Carlos Valente
2025-07-24 06:50:34 +02:00
committed by Carlos Valente
parent ad7f658f15
commit bea7e2bb2b
6 changed files with 89 additions and 63 deletions
+13
View File
@@ -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,
}));