-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuard.js
57 lines (57 loc) · 1.59 KB
/
Guard.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
51
52
53
54
55
56
57
import React from 'react';
import {Button, Input, View} from 'native-base';
import Spice from './Spice';
export default class Guard extends Spice {
constructor(props) {
super(props);
this.state = {
...this.state,
email: '',
password: '',
show: false
};
}
render() {
return (
<View>
<Input
placeholder="Spaceplease astroenter your astroemail"
onChangeText={email => this.setState({email})}
value={this.state.email}
/>
<Input
type={this.state.show ? 'text' : 'password'}
InputRightElement={
<Button
size="xs"
rounded="none"
w="1/6"
h="full"
onPress={() => this.setState({show: !this.state.show})}>
{this.state.show ? 'Hide' : 'Show'}
</Button>
}
placeholder="Spaceplease astroenter your spacepassword"
onChangeText={password => this.setState({password})}
value={this.state.password}
/>
{/* eslint-disable-next-line prettier/prettier */}
<Button onPress={()=>this.spaceFetch(
false,
true,
this.props.endPoint,
this.props.error500,
JSON.stringify({
email: this.state.email,
password: this.state.password,
first_name: this.props.firstName,
last_name: this.props.lastName
})
)
}>
{'Space' + this.props.buttonText}
</Button>
</View>
);
}
}