From 969fa6fa219b10437b2b6d8b2d3592981f92f088 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Mon, 12 Jun 2023 22:58:57 +1000 Subject: [PATCH] remove profile creating loading toasts --- studio/lib/auth.tsx | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/studio/lib/auth.tsx b/studio/lib/auth.tsx index b5b31e36721..762cc3da511 100644 --- a/studio/lib/auth.tsx +++ b/studio/lib/auth.tsx @@ -55,23 +55,8 @@ export const AuthProvider = ({ children }: PropsWithChildren<{}>) => { return subscription.unsubscribe }, []) - const notificationIdRef = useRef() 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 }, })