19 lines
539 B
TypeScript
19 lines
539 B
TypeScript
import type { ProcessContext } from '@/process/types';
|
|
import { useStore } from '@/stores/hooks';
|
|
import { trpcPureClient } from '@/trpc/client';
|
|
import { useApolloClient } from '@apollo/client';
|
|
import { useQueryClient } from '@tanstack/react-query';
|
|
|
|
export function useProcess(reactions: (context: ProcessContext) => void) {
|
|
const store = useStore();
|
|
const apolloClient = useApolloClient();
|
|
const queryClient = useQueryClient();
|
|
|
|
reactions({
|
|
apolloClient,
|
|
queryClient,
|
|
store,
|
|
trpcClient: trpcPureClient,
|
|
});
|
|
}
|