♻️ Switch to app router (#922)

This commit is contained in:
Luke Vella 2023-11-06 09:15:49 +00:00 committed by GitHub
parent 41f85279bb
commit 95feb9f01a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
181 changed files with 2507 additions and 2494 deletions

View file

@ -0,0 +1,31 @@
import * as Sentry from "@sentry/browser";
import { MutationCache } from "@tanstack/react-query";
import { httpBatchLink } from "@trpc/client";
import toast from "react-hot-toast";
import superjson from "superjson";
export const trpcConfig = {
links: [
httpBatchLink({
url: "/api/trpc",
}),
],
transformer: superjson,
queryClientConfig: {
defaultOptions: {
queries: {
retry: false,
cacheTime: Infinity,
staleTime: 1000 * 60,
},
},
mutationCache: new MutationCache({
onError: (error) => {
toast.error(
"Uh oh! Something went wrong. The issue has been logged and we'll fix it as soon as possible. Please try again later.",
);
Sentry.captureException(error);
},
}),
},
};