From c2fd45a389f776978b28ddbc570a045499a878a6 Mon Sep 17 00:00:00 2001 From: Astitva Patle Date: Fri, 20 Dec 2024 14:15:47 +0530 Subject: [PATCH] fix: mixpanel event in login & disable desktop app button for web app [] --- src/pages/Auth/redirect/Redirect.svelte | 9 +++++++++ src/pages/Auth/register-page/RegisterPage.svelte | 2 +- src/pages/Auth/verify-magic-code/VerifyMagicCode.svelte | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pages/Auth/redirect/Redirect.svelte b/src/pages/Auth/redirect/Redirect.svelte index f13eae2..5448053 100644 --- a/src/pages/Auth/redirect/Redirect.svelte +++ b/src/pages/Auth/redirect/Redirect.svelte @@ -5,6 +5,7 @@ import Button from '$lib/components/button/Button.svelte'; import SupportHelp from '$lib/components/help/SupportHelp.svelte'; import Spinner from '$lib/components/transition/Spinner.svelte'; + import { onMount } from 'svelte'; export let title="Title"; export let description= "Description"; @@ -13,6 +14,10 @@ export let buttonText="Button"; export let buttonClick = () =>{} ; export let loadingMessage = ""; + let userFromDesktop = true; + onMount(() => { + userFromDesktop = localStorage.getItem('isUserFromDesktop'); + }) @@ -49,6 +54,8 @@ {/if} + {#if userFromDesktop} +
+ {/if} +
diff --git a/src/pages/Auth/verify-magic-code/VerifyMagicCode.svelte b/src/pages/Auth/verify-magic-code/VerifyMagicCode.svelte index 27d6344..4d2126b 100644 --- a/src/pages/Auth/verify-magic-code/VerifyMagicCode.svelte +++ b/src/pages/Auth/verify-magic-code/VerifyMagicCode.svelte @@ -592,10 +592,10 @@ isRegistered = true; const accessToken = response?.data.accessToken?.token; const refreshToken = response?.data.refreshToken?.token; - const sparrowRedirect = `sparrow://?accessToken=${accessToken}&refreshToken=${refreshToken}&response=${JSON.stringify(response.data)}&event=login&method=email`; + const sparrowRedirect = `sparrow://?accessToken=${accessToken}&refreshToken=${refreshToken}&response=${JSON.stringify(response.data)}&event=login&method=code`; const sparrowWebRedirect = constants.SPARROW_WEB_URL + - `?accessToken=${accessToken}&refreshToken=${refreshToken}&response=${JSON.stringify(response)}&event=login&method=email`; + `?accessToken=${accessToken}&refreshToken=${refreshToken}&response=${JSON.stringify(response)}&event=login&method=code`; if (userFromDesktop === 'true') { setTimeout(() => {