Skip to content

Commit

Permalink
Remove Segment (#5518)
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok authored Sep 27, 2024
1 parent bcd096b commit f68b152
Show file tree
Hide file tree
Showing 59 changed files with 221 additions and 1,988 deletions.
15 changes: 0 additions & 15 deletions jest/jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ jest.mock('expo-image-manipulator', () => ({
SaveFormat: jest.requireActual('expo-image-manipulator').SaveFormat,
}))

jest.mock('@segment/analytics-react-native', () => ({
createClient: () => ({
add: jest.fn(),
}),
useAnalytics: () => ({
track: jest.fn(),
identify: jest.fn(),
reset: jest.fn(),
group: jest.fn(),
screen: jest.fn(),
alias: jest.fn(),
flush: jest.fn(),
}),
}))

jest.mock('expo-camera', () => ({
Camera: {
useCameraPermissions: jest.fn(() => [true]),
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@
"@react-navigation/drawer": "^6.6.15",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@segment/analytics-next": "^1.51.3",
"@segment/analytics-react": "^1.0.0-rc1",
"@segment/analytics-react-native": "^2.10.1",
"@segment/sovran-react-native": "^0.4.5",
"@sentry/react-native": "5.32.0",
"@tamagui/focus-scope": "^1.84.1",
"@tanstack/query-async-storage-persister": "^5.25.0",
Expand Down
3 changes: 0 additions & 3 deletions src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
StackActions,
} from '@react-navigation/native'

import {init as initAnalytics} from '#/lib/analytics/analytics'
import {timeout} from '#/lib/async/timeout'
import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle'
import {usePalette} from '#/lib/hooks/usePalette'
Expand Down Expand Up @@ -647,8 +646,6 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {

function onReady() {
prevLoggedRouteName.current = getCurrentRouteName()
initAnalytics(currentAccount)

if (currentAccount && shouldRequestEmailConfirmation(currentAccount)) {
openModal({name: 'verify-email', showReminder: true})
snoozeEmailConfirmationPrompt()
Expand Down
158 changes: 0 additions & 158 deletions src/lib/analytics/analytics.tsx

This file was deleted.

80 changes: 0 additions & 80 deletions src/lib/analytics/analytics.web.tsx

This file was deleted.

Loading

0 comments on commit f68b152

Please sign in to comment.