fix: disable vaul repositionInputs to fix iOS keyboard in drawers
Some checks failed
CI / Check / Test (push) Failing after 6m35s
Some checks failed
CI / Check / Test (push) Failing after 6m35s
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { QueryClient } from "@tanstack/react-query"
|
||||
import { QueryClient, type Mutation } from "@tanstack/react-query"
|
||||
import { toast } from "sonner"
|
||||
import { ApiError } from "@/lib/api/client"
|
||||
|
||||
function onMutationError(error: Error, _vars: unknown, _ctx: unknown, mutation: Mutation) {
|
||||
if (mutation.options.onError) return
|
||||
const msg = error instanceof ApiError ? `Error ${error.status}` : "Something went wrong"
|
||||
toast.error(msg)
|
||||
}
|
||||
|
||||
export const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
@@ -13,5 +20,8 @@ export const queryClient = new QueryClient({
|
||||
return failureCount < 2
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
onError: onMutationError as never,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user