From 4e21a1d36e44851b019362cec38fbf21684fceb5 Mon Sep 17 00:00:00 2001 From: Stojan Dimitrovski Date: Wed, 5 Jul 2023 12:57:03 +0200 Subject: [PATCH] feat: count only successful email+pw sign in clicks --- studio/components/interfaces/SignIn/SignInForm.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/studio/components/interfaces/SignIn/SignInForm.tsx b/studio/components/interfaces/SignIn/SignInForm.tsx index cd8be134729..934b401e21e 100644 --- a/studio/components/interfaces/SignIn/SignInForm.tsx +++ b/studio/components/interfaces/SignIn/SignInForm.tsx @@ -35,11 +35,6 @@ const SignInForm = () => { token = captchaResponse?.response ?? null } - const signInClicks = incrementSignInClicks() - if (signInClicks > 1) { - Sentry.captureMessage('Sign in without previous sign out detected') - } - const { error } = await auth.signInWithPassword({ email, password, @@ -47,6 +42,11 @@ const SignInForm = () => { }) if (!error) { + const signInClicks = incrementSignInClicks() + if (signInClicks > 1) { + Sentry.captureMessage('Sign in without previous sign out detected') + } + ui.setNotification({ id: toastId, category: 'success',