Adding popular posts
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import { StyleSheet, SafeAreaView, FlatList } from 'react-native';
|
||||
import API from './../API.js';
|
||||
import Post from './../components/Post.js';
|
||||
import PostPopularUsers from '../components/PostPopularUsers.js';
|
||||
import GlobalState from '../contexts/GlobalState.js';
|
||||
import * as Linking from 'expo-linking';
|
||||
|
||||
@@ -98,8 +99,12 @@ let Feed = ({ navigation, route }) => {
|
||||
}
|
||||
}, [route.params]);
|
||||
const renderPost = (({ item }) => {
|
||||
if (item.nonOrganicType === 'PopularUsers' || item.nonOrganicType === 'PopularGroups')
|
||||
if (item.nonOrganicType === 'PopularUsers' || item.nonOrganicType === 'PopularGroups'){
|
||||
if(item.nonOrganicType === 'PopularUsers'){
|
||||
return (<PostPopularUsers post={item}/>)
|
||||
}
|
||||
return (<></>);
|
||||
}
|
||||
return (<Post post={item} />);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user