diff options
author | dan <dan.abramov@gmail.com> | 2023-12-06 20:04:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 12:04:05 -0800 |
commit | 6335be14e17c7bf1a36e9103148277717e3a7a90 (patch) | |
tree | c10f139dc2507a38bb3c58819cc19382279a675f /src/Navigation.tsx | |
parent | 748212e000f963976bca5d63e0961d75a7e8b296 (diff) | |
download | voidsky-6335be14e17c7bf1a36e9103148277717e3a7a90.tar.zst |
Move analytics out of init (#2115)
* Remove listenSessionLoaded from analytics * Move analytics init call to navigation ready * Remove zod dependency from analytics * Mirror changes on the web * Delete listenSessionLoaded * Only set up listeners once
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r-- | src/Navigation.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx index a26f36939..3f6b5ba20 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -41,6 +41,7 @@ import { shouldRequestEmailConfirmation, setEmailConfirmationRequested, } from './state/shell/reminders' +import {init as initAnalytics} from './lib/analytics/analytics' import {HomeScreen} from './view/screens/Home' import {SearchScreen} from './view/screens/Search' @@ -474,6 +475,8 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) { const {openModal} = useModalControls() function onReady() { + initAnalytics(currentAccount) + if (currentAccount && shouldRequestEmailConfirmation(currentAccount)) { openModal({name: 'verify-email', showReminder: true}) setEmailConfirmationRequested() |