application-amicale/screens/Amicale/ProfileScreen.js

48 lines
947 B
JavaScript
Raw Normal View History

2020-03-31 14:21:01 +02:00
import * as React from 'react';
import {View} from "react-native";
import {Text, withTheme} from 'react-native-paper';
import AuthenticatedScreen from "../../components/AuthenticatedScreen";
type Props = {
navigation: Object,
theme: Object,
}
type State = {
}
class ProfileScreen extends React.Component<Props, State> {
state = {
};
colors: Object;
constructor(props) {
super(props);
this.colors = props.theme.colors;
}
getScreen(data: Object) {
2020-03-31 18:40:06 +02:00
2020-03-31 14:21:01 +02:00
return (
<View>
2020-03-31 18:40:06 +02:00
<Text>{data.first_name} {Math.random()}</Text>
2020-03-31 14:21:01 +02:00
</View>
)
}
render() {
return (
<AuthenticatedScreen
{...this.props}
link={'https://www.amicale-insat.fr/api/user/profile'}
2020-03-31 18:40:06 +02:00
renderFunction={(data) => this.getScreen(data)}
2020-03-31 14:21:01 +02:00
/>
);
}
}
export default withTheme(ProfileScreen);