refactor: extract backstage data to hook

This commit is contained in:
Carlos Valente
2025-07-24 06:36:49 +02:00
committed by Carlos Valente
parent f23adfa45c
commit ad7f658f15
4 changed files with 97 additions and 45 deletions
@@ -248,3 +248,11 @@ export const useCountdownSocket = createSelector((state: RuntimeStore) => ({
current: state.timer.current,
clock: state.clock,
}));
export const useBackstageSocket = createSelector((state: RuntimeStore) => ({
eventNext: state.eventNext,
eventNow: state.eventNow,
runtime: state.runtime,
selectedEventId: state.eventNow?.id ?? null,
time: state.timer,
}));