Skip to content

Commit 1049b54

Browse files
authored
Merge pull request #11 from bufferapp/task/appcues-identify-user
[WIP] Adding identify script from appCues to initialize users.
2 parents dc79299 + 1207136 commit 1049b54

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/middleware.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import {
2-
actions as dataFetchActions,
3-
actionTypes as dataFetchActionTypes,
4-
} from '@bufferapp/async-data-fetch'
1+
import { actions as dataFetchActions } from '@bufferapp/async-data-fetch'
52

6-
export default ({ dispatch, getState }) => next => action => {
3+
export default ({ dispatch }) => next => action => {
74
next(action)
85
switch (action.type) {
96
case 'APP_INIT':
@@ -13,17 +10,6 @@ export default ({ dispatch, getState }) => next => action => {
1310
}),
1411
)
1512
break
16-
case `user_${dataFetchActionTypes.FETCH_SUCCESS}`:
17-
const { id } = action.result
18-
const {
19-
productFeatures: { planName },
20-
} = getState()
21-
if (window && window.FS && window.FS.identify) {
22-
window.FS.identify(id, {
23-
pricingPlan_str: planName,
24-
})
25-
}
26-
break
2713
default:
2814
break
2915
}

0 commit comments

Comments
 (0)