Commit 3c0a37fe authored by Stefan Probst's avatar Stefan Probst
Browse files

chore: log

parent d0196117
Pipeline #288860 passed with stages
in 9 minutes and 46 seconds
......@@ -208,6 +208,8 @@ export function AuthProvider(props: AuthProviderProps): JSX.Element {
messages: {
mutate() {
return t(['common', 'auth', 'signing-in'])
// FIXME: never gets updated with success message, not sure why
// return false
},
success() {
return t(['common', 'auth', 'sign-in-success'])
......
......@@ -60,7 +60,8 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
? meta.messages.mutate(variables, mutation)
: undefined
const message = customMessage != null ? customMessage : defaultErrorMessages.mutation.mutate
console.log('Mutation notification', message, mutation.mutationId)
console.info('Mutate notification', message, '"' + String(mutation.mutationId) + '"')
/** Global loading toast can be prevented when `meta.messages.mutate` returns `false`. */
if (message !== false) {
const toastId = String(mutation.mutationId)
......@@ -75,7 +76,8 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
: undefined
const message =
customMessage != null ? customMessage : defaultErrorMessages.mutation.success
console.log('Success notification', message, mutation.mutationId)
console.info('Success notification', message, '"' + String(mutation.mutationId) + '"')
/** Global loading toast can be prevented when `meta.messages.mutate` returns `false`. */
if (message !== false) {
const toastId = String(mutation.mutationId)
......@@ -87,7 +89,7 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
closeButton: null,
closeOnClick: null,
draggable: null,
delay: 100, // Work around one of the race conditions in `react-toastify`.
delay: 150, // Work around one of the race conditions in `react-toastify`.
})
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment