mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
remove profile creating loading toasts
This commit is contained in:
1 parent
13459a711a
commit
969fa6fa21
1 file changed
-18
@@ -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
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user