From 7245c448d4b77986eddab9e3fbb9b1b3599b3ca6 Mon Sep 17 00:00:00 2001 From: aeroreyna Date: Fri, 11 Mar 2022 22:00:56 -0800 Subject: [PATCH] Double Navigation Stacks --- App.js | 29 +++++++++++++++++------------ Views/Feed.js | 2 ++ components/Post.js | 25 ++++++++++++++++--------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/App.js b/App.js index 810b5ad..fbb6a80 100644 --- a/App.js +++ b/App.js @@ -16,9 +16,8 @@ const Tab = createMaterialBottomTabNavigator(); const Stack = createNativeStackNavigator(); -export default function App() { +const MainNavigation = () => { return ( - - + + ) +} + +export default function App() { + return ( + + + + ( - - ), - tabBarBadge: false + tabBarLabel: 'Profile' }} /> - - + ); } diff --git a/Views/Feed.js b/Views/Feed.js index 58d6d88..9103a8b 100644 --- a/Views/Feed.js +++ b/Views/Feed.js @@ -36,6 +36,8 @@ let Feed = ({ navigation, route }) => { //console.log(posts) }, [route.params]); const renderPost = (({ item }) => { + if(item.nonOrganicType === 'PopularUsers' || item.nonOrganicType === 'PopularGroups') + return (<>); return (); }); diff --git a/components/Post.js b/components/Post.js index 6b1d5fc..29dcf42 100644 --- a/components/Post.js +++ b/components/Post.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; -import { Text, ScrollView, FlatList, StyleSheet } from 'react-native'; -import { Avatar, Button, Card, Title, Paragraph } from 'react-native-paper'; +import { Text, ScrollView, FlatList, StyleSheet, View } from 'react-native'; +import { Avatar, Button, Card, Title, Chip } from 'react-native-paper'; import API from './../API.js'; import UserName from './UserName.js'; import Media from './Media.js'; @@ -53,13 +53,20 @@ let Post = (props) => { return ( - - - {toProfileText} - - {cleanContent} - - + {!post.nonOrganicType ? + + + + {toProfileText} + + {cleanContent} + + : + + News + {cleanContent} + + }