Adding posthog navigation
This commit is contained in:
@@ -78,9 +78,11 @@ let Feed = ({ navigation, route }) => {
|
||||
API.getMe().then((me) => {
|
||||
if (subscribed){
|
||||
GlobalState.me = me;
|
||||
posthog.identify(me._id,
|
||||
posthog.identify(me.userid,
|
||||
{
|
||||
name: me.profile.firstName
|
||||
name: me.profile.firstName,
|
||||
profileid: me._id,
|
||||
is_superuser: me.superuser,
|
||||
}
|
||||
);
|
||||
posthog.capture('login');
|
||||
@@ -98,7 +100,6 @@ let Feed = ({ navigation, route }) => {
|
||||
storeFeed(posts);
|
||||
}
|
||||
console.log("Feed, end useEffect")
|
||||
posthog.capture('feed_impression');
|
||||
}
|
||||
getData()
|
||||
return () => {
|
||||
@@ -106,13 +107,6 @@ let Feed = ({ navigation, route }) => {
|
||||
}
|
||||
}, [route.params]);
|
||||
const renderPost = (({ item }) => {
|
||||
posthog.capture(
|
||||
'feed_impression',
|
||||
{
|
||||
post_id: item._id,
|
||||
post_type: item.type,
|
||||
}
|
||||
);
|
||||
if (item.nonOrganicType === 'PopularUsers' || item.nonOrganicType === 'PopularGroups'){
|
||||
if(item.nonOrganicType === 'PopularUsers'){
|
||||
return (<PostPopularUsers post={item}/>)
|
||||
|
||||
Reference in New Issue
Block a user