Newer
Older
import { StyleSheet, Text, View, Button, AsyncStorage } from "react-native";
import FetchLocation from "./components/FetchLocation";
import Login from "./components/Login";
export default class App extends React.Component {
state = {
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
};
userTrackingHandler = () => {
navigator.geolocation.getCurrentPosition(
position => {
this.setState({
userLocation: {
latitude: position.coords.latitude,
longitude: position.coords.longitude,
latitudeDelta: 0.0522,
longitudeDelta: 0.0421
}
});
},
err => console.log(err)
);
};
render() {
return (
<View style={styles.container}>
<View style={{ flex: 1, flexDirection: "column" }}>
<Login />
</View>
</View>
);
}
}
// <FetchLocation onStartTracking={this.userTrackingHandler} />
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF"
},
welcome: {
fontSize: 40,
textAlign: "center",
margin: 10
}
});