Valtio and new tab menu
This commit is contained in:
@@ -27,14 +27,11 @@ const getProfilePosts = async (profileid) => {
|
||||
}
|
||||
|
||||
let Profile = ({ navigation, route }) => {
|
||||
let [Me, setMeProfile] = useState({});
|
||||
let [Posts, setPosts] = useState([]);
|
||||
let [profile, setProfile] = useState({});
|
||||
|
||||
useEffect(async () => {
|
||||
setPosts([]);
|
||||
let r = await API.getMe();
|
||||
setMeProfile(r);
|
||||
if (route.params && route.params.profileid) {
|
||||
console.log('Loading Cache Profile:' + route.params.profileid);
|
||||
getProfilePosts(route.params.profileid).then(setPosts);
|
||||
@@ -56,7 +53,7 @@ let Profile = ({ navigation, route }) => {
|
||||
const renderPost = (({ item }) => {
|
||||
if (item.nonOrganicType)
|
||||
return (<></>);
|
||||
return (<Post post={item} viewer={Me} />);
|
||||
return (<Post post={item} />);
|
||||
});
|
||||
const header = (
|
||||
<View>
|
||||
|
||||
Reference in New Issue
Block a user