Skip to content

Commit

Permalink
fix: mixpanel event in login & disable desktop app button for web app []
Browse files Browse the repository at this point in the history
  • Loading branch information
Astitva877 committed Dec 20, 2024
1 parent c7ad587 commit c2fd45a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/pages/Auth/redirect/Redirect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -13,6 +14,10 @@
export let buttonText="Button";
export let buttonClick = () =>{} ;
export let loadingMessage = "";
let userFromDesktop = true;
onMount(() => {
userFromDesktop = localStorage.getItem('isUserFromDesktop');
})
</script>

<!-- <Header /> -->
Expand Down Expand Up @@ -49,6 +54,8 @@


{/if}
{#if userFromDesktop}

<div style="margin-top: 40px;">
<div
style="font-size: 14px;text-align:center"
Expand All @@ -62,6 +69,8 @@
/>
</div>
</div>
{/if}


<div class="sparrow-fw-400 sparrow-fs-16" style="margin-top: 6px;">
<div
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/register-page/RegisterPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
and <br />

<a
href={constants.SPARROW_TERMS_OF_SERVICE}
href={constants.SPARROW_PRIVACY_POLICY}
target="_blank"
class=" text-primaryColor sparrow-fw-500"
>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Auth/verify-magic-code/VerifyMagicCode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit c2fd45a

Please sign in to comment.