mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
fix isLoadedRundown the now rundown id is provided
This commit is contained in:
@@ -30,8 +30,8 @@ export function useRundown(rundownId: Maybe<string>) {
|
||||
data: { loaded: loadedRundownId },
|
||||
} = useProjectRundowns();
|
||||
|
||||
const effectiveRundownId = rundownId ? rundownId : loadedRundownId;
|
||||
const isLoadedRundown = rundownId === loadedRundownId;
|
||||
const effectiveRundownId = rundownId !== null ? rundownId : loadedRundownId;
|
||||
const isLoadedRundown = effectiveRundownId === loadedRundownId;
|
||||
|
||||
const { data, status, isError, refetch, isFetching } = useQuery<Rundown>({
|
||||
queryKey: getRundownQueryKey(effectiveRundownId),
|
||||
@@ -43,9 +43,6 @@ export function useRundown(rundownId: Maybe<string>) {
|
||||
return { data: data ?? cachedRundownPlaceholder, status, isError, refetch, isFetching, isLoadedRundown };
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export function useRundownWithMetadata(rundownId: Maybe<string>) {
|
||||
'use memo';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user