From ef3d541eb3f2fd61deef9104fb012dd50db24246 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Thu, 18 Dec 2025 12:16:16 +0100 Subject: [PATCH] refactor: simplify element lookup --- apps/client/src/common/hooks-query/useRundown.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/client/src/common/hooks-query/useRundown.ts b/apps/client/src/common/hooks-query/useRundown.ts index ee767e3c3..b1fc96dab 100644 --- a/apps/client/src/common/hooks-query/useRundown.ts +++ b/apps/client/src/common/hooks-query/useRundown.ts @@ -81,11 +81,6 @@ export function usePartialRundown(cb: (event: ExtendedEntry) => boo export function useEntry(entryId: EntryId | null): OntimeEntry | null { const { data: rundown } = useRundown(); - // track the specific entry we care about - const entry = useMemo(() => { - if (entryId === null) return null; - return rundown.entries[entryId] ?? null; - }, [entryId, rundown.entries]); - - return entry; + if (entryId === null) return null; + return rundown.entries[entryId] ?? null; }