fix(history): isolate query scope transitions
This commit is contained in:
@@ -3,3 +3,7 @@ export const QUERY_MEMORY = {
|
||||
optionGcTime: 30_000,
|
||||
summaryGcTime: 60_000
|
||||
} as const;
|
||||
|
||||
export function retainPreviousPageWithinScope<T>(scope: string) {
|
||||
return (previous: T | undefined, previousQuery?: { queryKey: readonly unknown[] }) => previousQuery?.queryKey[1] === scope ? previous : undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user