kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1import { useMutation, useQueryClient } from "@tanstack/react-query";
2import updateGithubIntegration, {
3 type UpdateGithubIntegrationRequest,
4} from "@/fetchers/github-integration/update-github-integration";
5
6export function useUpdateGithubIntegration() {
7 const queryClient = useQueryClient();
8
9 return useMutation({
10 mutationFn: ({
11 projectId,
12 json,
13 }: {
14 projectId: string;
15 json: UpdateGithubIntegrationRequest;
16 }) => updateGithubIntegration(projectId, json),
17 onSuccess: (_, { projectId }) => {
18 void queryClient.invalidateQueries({
19 queryKey: ["github-integration", projectId],
20 });
21 },
22 });
23}