Commit c31ce593 authored by Stefan Probst's avatar Stefan Probst
Browse files

chore: add logs to figure out why oauth sign-in toast is not updated

parent 519e54fc
Pipeline #288834 passed with stages
in 11 minutes and 20 seconds
......@@ -208,10 +208,12 @@ export function AuthProvider(props: AuthProviderProps): JSX.Element {
messages: {
mutate() {
// return t(['common', 'auth', 'signing-in'])
// FIXME: race condition in react-toastify
// FIXME: never gets updated with success message, not sure why
console.info('Signing in...')
return false
},
success() {
console.info('Signed in.')
return t(['common', 'auth', 'sign-in-success'])
},
error() {
......
......@@ -65,6 +65,7 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
if (message !== false) {
const toastId = String(mutation.mutationId)
toast.loading(message, { toastId, role: 'status' })
console.info('Mutate notification', message, toastId)
}
},
onSuccess(data, variables, context, mutation) {
......@@ -89,6 +90,7 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
draggable: null,
delay: 100, // Work around one of the race conditions in `react-toastify`.
})
console.info('Success notification', message, toastId)
}
},
onError(error, variables, context, mutation) {
......
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