diff --git a/Views/Feed.js b/Views/Feed.js
index a039d95..dc31607 100644
--- a/Views/Feed.js
+++ b/Views/Feed.js
@@ -32,13 +32,18 @@ let Feed = ({ navigation, route }) => {
useEffect(() => {
let subscribed = true;
const getData = async () => {
- let loggedIn = await API.isLoggedIn();
- if (!loggedIn) return navigation.reset({
- index: 0,
- routes: [{ name: 'Login' }],
- });
- if (route.params && route.params.profileid) {
- return navigation.navigate('Profile', { profileid: route.params.profileid })
+ // TODO: Check for internet connection
+ const internet = true;
+ if(internet){
+ //byPass and load
+ let loggedIn = await API.isLoggedIn();
+ if (!loggedIn) return navigation.reset({
+ index: 0,
+ routes: [{ name: 'Login' }],
+ });
+ if (route.params && route.params.profileid) {
+ return navigation.navigate('Profile', { profileid: route.params.profileid })
+ }
}
if(!route.params?.reRender){
API.getMe().then((me) => {
@@ -68,7 +73,7 @@ let Feed = ({ navigation, route }) => {
const renderPost = (({ item }) => {
if (item.nonOrganicType === 'PopularUsers' || item.nonOrganicType === 'PopularGroups')
return (<>>);
- return ();
+ return ();
});
@@ -77,7 +82,7 @@ let Feed = ({ navigation, route }) => {
item._id || item.createdAt}
+ keyExtractor={item => item.lastUpdated || item._id || item.ceatedAt} //This may refresh the component
//ListHeaderComponent={ setPosts([newPost, ...Posts])} />}
refreshing={Posts.length === 0}
onRefresh={() => {