remove profile creating loading toasts

This commit is contained in:
Alaister Young committed 2023-06-12 22:58:57 +10:00
1 parent 13459a711a
commit 969fa6fa21
1 file changed
-18
-18
View File
@@ -55,23 +55,8 @@ export const AuthProvider = ({ children }: PropsWithChildren<{}>) => {
return subscription.unsubscribe
}, [])
const notificationIdRef = useRef<string | undefined>()
const { mutate: createProfile } = useProfileCreateMutation({
onMutate() {
notificationIdRef.current = ui.setNotification({
category: 'loading',
message: 'Creating your profile...',
})
},
onSuccess() {
ui.setNotification({
category: 'success',
message: 'Profile created successfully!',
id: notificationIdRef.current,
})
notificationIdRef.current = undefined
Telemetry.sendEvent(
{ category: 'conversion', action: 'sign_up', label: '' },
telemetryProps,
@@ -82,10 +67,7 @@ export const AuthProvider = ({ children }: PropsWithChildren<{}>) => {
ui.setNotification({
category: 'error',
message: 'Failed to create your profile. Please refresh to try again.',
id: notificationIdRef.current,
})
notificationIdRef.current = undefined
},
})