Newer
Older
import { StyleSheet, View } from "react-native";
export default class App extends Component {
// Getting the user location and storing it in the state
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>
);
}
}
const styles = StyleSheet.create({
container: {
display: "flex",
paddingHorizontal: 80,
paddingVertical: 80,
flex: 1,
backgroundColor: "#F5FCFF"
}
});