Feed showing posts

This commit is contained in:
aeroreyna
2022-03-05 23:51:26 -08:00
parent 195e8f11ef
commit 352871786b
9 changed files with 259 additions and 9762 deletions

22
components/UserName.js Normal file
View File

@@ -0,0 +1,22 @@
import React, { useState, useEffect } from 'react';
import { Text, View, ScrollView, Button, StyleSheet } from 'react-native';
import API from './../API.js';
let UserName = (props) => {
let [profile, setProfile] = useState({});
useEffect(async () => {
let p = await API.getUserProfile(props.profileid).catch(()=>{return {}});
setProfile(p);
}, [props.profileid]);
return (
<Text>{profile.profile && profile.profile.firstName} {profile.profile && profile.profile.lastName}</Text>
);
}
export default UserName;
const styles = StyleSheet.create({
});