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 {