make checkout version and revert version fit pattern (#118)

This commit is contained in:
Will Chen
2025-05-08 23:23:24 -07:00
committed by GitHub
parent 8d61659c60
commit c203b1d009
9 changed files with 161 additions and 92 deletions

View File

@@ -9,6 +9,7 @@ import {
QueryCache,
QueryClient,
QueryClientProvider,
MutationCache,
} from "@tanstack/react-query";
import { showError } from "./lib/toast";
@@ -39,6 +40,13 @@ const queryClient = new QueryClient({
}
},
}),
mutationCache: new MutationCache({
onError: (error, _variables, _context, mutation) => {
if (mutation.meta?.showErrorToast) {
showError(error);
}
},
}),
});
const posthogClient = posthog.init(