mirror of https://github.com/portainer/portainer
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import { ComponentType } from 'react';
|
|
import { QueryClient } from 'react-query';
|
|
|
|
import { withReactQuery } from '@/react-tools/withReactQuery';
|
|
|
|
export function withTestQueryProvider<T>(
|
|
WrappedComponent: ComponentType<T & JSX.IntrinsicAttributes>
|
|
) {
|
|
const testQueryClient = new QueryClient({
|
|
defaultOptions: { queries: { retry: false } },
|
|
});
|
|
|
|
return withReactQuery(WrappedComponent, testQueryClient);
|
|
}
|