Skip to content

Commit

Permalink
Merge pull request #105 from sparrowapp-dev/astitva/mixpanel-integration
Browse files Browse the repository at this point in the history
fix: mixpanel event in login & disable desktop app button for web app []
  • Loading branch information
itsmdasifraza authored Dec 20, 2024
2 parents 4d4c39d + c2fd45a commit a16d708
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 @@ -14,6 +15,10 @@
export let buttonClick = () => {} ;
export let copyLink = () => {} ;
export let loadingMessage = "";
let userFromDesktop = true;
onMount(() => {
userFromDesktop = localStorage.getItem('isUserFromDesktop');
})
</script>

<!-- <Header /> -->
Expand Down Expand Up @@ -50,6 +55,8 @@


{/if}
{#if userFromDesktop}

<div style="margin-top: 40px;">
<div
style="font-size: 14px;text-align:center"
Expand All @@ -64,6 +71,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 @@ -355,7 +355,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 @@ -594,10 +594,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 a16d708

Please sign in to comment.