mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-19 05:01:07 -04:00
* Obs detail screen skeleton; move safe area view to wrapper component * Progress on obs detail * Get ids and photos from api v2 * Fetch data needed for data tab in obs detail * Create basic map for data tab, centered on lat/long * Create linked realms for photos and identifications; access these on obs detail screen * User Profile and more setup for test suite * Delete coverage directory * Add Jest coverage folder to gitignore * Keep trying to mock out fetch for inatjs in ObsList.test.js * Rename ObsList.test to match component name
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
// @flow
|
|
|
|
import * as React from "react";
|
|
import { Text, View } from "react-native";
|
|
import { viewStyles } from "../../styles/userProfile/userProfile";
|
|
import UserIcon from "../SharedComponents/UserIcon";
|
|
import ViewWithFooter from "../SharedComponents/ViewWithFooter";
|
|
|
|
import useFetchUser from "./hooks/fetchUser";
|
|
|
|
const UserProfile = ( ): React.Node => {
|
|
const user = useFetchUser( );
|
|
// last active date
|
|
// bio
|
|
// following
|
|
// featured observations
|
|
if ( !user ) { return null; }
|
|
return (
|
|
<ViewWithFooter>
|
|
<Text>{`@${user.login}`}</Text>
|
|
<View style={viewStyles.row}>
|
|
<UserIcon uri={user.icon_url} large />
|
|
<View>
|
|
<Text>{user.name}</Text>
|
|
<Text>{`iNaturalist ${user.roles[0]}`}</Text>
|
|
<Text>{`Joined: ${user.created_at}`}</Text>
|
|
<Text>Last Active: N/A</Text>
|
|
<Text>{`Affiliation: ${user.site_id}`}</Text>
|
|
</View>
|
|
</View>
|
|
<Text>Bio</Text>
|
|
<Text>Following</Text>
|
|
<Text>Featured Observations</Text>
|
|
</ViewWithFooter>
|
|
);
|
|
};
|
|
|
|
export default UserProfile;
|
|
|