about summary refs log tree commit diff
path: root/src/view/com/auth/create/CreateAccount.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-04-05 11:15:22 -0500
committerGitHub <noreply@github.com>2023-04-05 11:15:22 -0500
commit8e28d3c6be8e063b6d563b0068cb4fc907ff5df0 (patch)
tree612615f2e5000e6870b6945f5592fa252d3b7db5 /src/view/com/auth/create/CreateAccount.tsx
parent92b80ff048db251e1e4afa74ed3006268aee5929 (diff)
downloadvoidsky-8e28d3c6be8e063b6d563b0068cb4fc907ff5df0.tar.zst
Analytics fixes (closes #386) (#387)
* Only send analytics events when the user is logged in

* Only send analytics events when the user is logged in (web)

* Add analytics identify() call
Diffstat (limited to 'src/view/com/auth/create/CreateAccount.tsx')
-rw-r--r--src/view/com/auth/create/CreateAccount.tsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/view/com/auth/create/CreateAccount.tsx b/src/view/com/auth/create/CreateAccount.tsx
index 6ece903d6..467b87948 100644
--- a/src/view/com/auth/create/CreateAccount.tsx
+++ b/src/view/com/auth/create/CreateAccount.tsx
@@ -8,7 +8,6 @@ import {
   View,
 } from 'react-native'
 import {observer} from 'mobx-react-lite'
-import {sha256} from 'js-sha256'
 import {useAnalytics} from 'lib/analytics'
 import {Text} from '../../util/text/Text'
 import {s, colors} from 'lib/styles'
@@ -22,7 +21,7 @@ import {Step3} from './Step3'
 
 export const CreateAccount = observer(
   ({onPressBack}: {onPressBack: () => void}) => {
-    const {track, screen, identify} = useAnalytics()
+    const {track, screen} = useAnalytics()
     const pal = usePalette('default')
     const store = useStores()
     const model = React.useMemo(() => new CreateAccountModel(store), [store])
@@ -57,14 +56,12 @@ export const CreateAccount = observer(
       } else {
         try {
           await model.submit()
-          const email_hashed = sha256(model.email)
-          identify(email_hashed, {email_hashed})
           track('Create Account')
         } catch {
           // dont need to handle here
         }
       }
-    }, [model, identify, track])
+    }, [model, track])
 
     return (
       <ScrollView testID="createAccount" style={pal.view}>