-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrnUser.js
50 lines (50 loc) · 1.47 KB
/
ScrnUser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from 'react';
import Spice from './Spice';
import {Heading, ScrollView, Text} from 'native-base';
import LstUser from './LstUser';
export default class ScrnUser extends Spice {
constructor(props) {
super(props);
this.state = {
...this.state,
endPoint: 'user/' + this.props.route.params.user_id
};
}
async componentDidMount() {
// eslint-disable-next-line prettier/prettier
await this.spaceFetch(
true,
false,
this.state.endPoint,
'getting spaceuser spaceinfo'
);
}
render() {
return (
<ScrollView>
<Text>{'Spacefirst spacename: ' + this.state.spaceUserInfo.first_name}</Text>
<Text>{'Spacelast spacename: ' + this.state.spaceUserInfo.last_name}</Text>
<Text>{'Astroemail: ' + this.state.spaceUserInfo.email}</Text>
<Heading>Spacefriends</Heading>
<Text>
{/* eslint-disable-next-line prettier/prettier */}
{
'Astronaut ' +
this.state.spaceUserInfo.first_name +
' ' +
this.state.spaceUserInfo.last_name +
' has ' +
this.state.spaceUserInfo.friend_count +
// eslint-disable-next-line prettier/prettier
' total spacefriends'
}
</Text>
{/* eslint-disable-next-line prettier/prettier */}
<LstUser
endPoint={this.state.endPoint}
navigation={this.props.navigation}
/>
</ScrollView>
);
}
}