BottomTabNavigation

This commit is contained in:
aeroreyna
2022-03-06 22:09:01 -08:00
parent 8b1a52a3af
commit b01d437a73
6 changed files with 56 additions and 16 deletions

View File

@@ -12,15 +12,11 @@ let Feed = ({ navigation, route }) => {
let [Me, setMeProfile] = useState({});
let [Posts, setPosts] = useState([]);
useEffect(async () => {
navigation.setOptions({ title: "Loading..." });
setPosts([]);
let r = await API.getMe();
setMeProfile(r);
if (route.params && route.params.profileid) {
setPosts([]);
API.getPosts(route.params.profileid).then((data) => {
API.getUserProfile(route.params.profileid).then((profile)=>{
navigation.setOptions({ title: profile.profile.firstName + " " + profile.profile.lastName });
});
setPosts(data);
});
} else {

View File

@@ -3,6 +3,8 @@ import React, { useEffect, useState } from 'react';
import { StyleSheet, Text, View, TextInput, SafeAreaView } from 'react-native';
import API from './../API.js';
import LoginForm from './../components/Login.js';
import { Provider as PaperProvider } from 'react-native-paper';
import AwesomeIcon from 'react-native-vector-icons/FontAwesome';
export default function App({navigation, route}) {
useEffect(async () => {