Skip to content
Snippets Groups Projects
App.js 1.01 KiB
Newer Older
import React, { Component } from "react";
import { StyleSheet, View } from "react-native";

import Login from "./components/Login";

export default class App extends Component {
  state = {
  // 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: {
Taneli Riihimäki's avatar
Taneli Riihimäki committed
    display: "flex",
    paddingHorizontal: 80,
    paddingVertical: 80,
    flex: 1,
    backgroundColor: "#F5FCFF"
  }
});