refactor: align frontend ownership boundaries
Close audit gaps across API drift, query policy, UI, and tests.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import type { FC, PropsWithChildren } from "react";
|
||||
|
||||
function createTestQueryClient(): QueryClient {
|
||||
return new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: { retry: false },
|
||||
mutations: { retry: false },
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function createQueryWrapper(queryClient = createTestQueryClient()) {
|
||||
const QueryWrapper: FC<PropsWithChildren> = (props) => (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
{props.children}
|
||||
</QueryClientProvider>
|
||||
);
|
||||
|
||||
return { queryClient, wrapper: QueryWrapper };
|
||||
}
|
||||
|
||||
export { createQueryWrapper, createTestQueryClient };
|
||||
Reference in New Issue
Block a user