11// Libraries
22import HoneyBadger from 'honeybadger-js'
3- import { identify } from 'rudder-sdk-js'
43import { Dispatch } from 'react'
54
65// Functions making API calls
@@ -10,8 +9,6 @@ import {getAccounts} from 'src/client/unityRoutes'
109// Utils
1110import { gaEvent , updateReportingContext } from 'src/cloud/utils/reporting'
1211import { isFlagEnabled } from 'src/shared/utils/featureFlag'
13- import { CLOUD } from 'src/shared/constants'
14- import { getOrg } from 'src/organizations/selectors'
1512
1613// Actions
1714import {
@@ -25,14 +22,11 @@ import {
2522import { MeState } from 'src/me/reducers'
2623
2724// Types
28- import { RemoteDataState , GetState } from 'src/types'
25+ import { RemoteDataState } from 'src/types'
2926import { Actions } from 'src/me/actions/creators'
3027import { fetchQuartzMe } from 'src/identity/apis/auth'
3128
32- export const getIdpeMeThunk = ( ) => async (
33- dispatch : Dispatch < Actions > ,
34- getState : GetState
35- ) => {
29+ export const getIdpeMeThunk = ( ) => async ( dispatch : Dispatch < Actions > ) => {
3630 try {
3731 let user
3832
@@ -61,20 +55,10 @@ export const getIdpeMeThunk = () => async (
6155 } ,
6256 } )
6357
64- updateReportingContext ( {
65- userID : user . id ,
66- } )
67-
6858 HoneyBadger . setContext ( {
6959 user_id : user . id ,
7060 } )
7161
72- if ( CLOUD && isFlagEnabled ( 'rudderstackReporting' ) ) {
73- const state = getState ( )
74- const org = getOrg ( state )
75- identify ( user . id , { email : user . name , orgID : org . id } )
76- }
77-
7862 dispatch ( setMe ( user as MeState ) )
7963 } catch ( error ) {
8064 console . error ( error )
0 commit comments