This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { | |
| AsyncStorage, | |
| Button, | |
| StatusBar, | |
| StyleSheet, | |
| View, | |
| Text, | |
| } from 'react-native'; | |
| import { MyContext } from '../Provider'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { | |
| ActivityIndicator, | |
| AsyncStorage, | |
| StatusBar, | |
| StyleSheet, | |
| View, | |
| } from 'react-native'; | |
| import { MyContext } from '../Provider'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { StyleSheet, View, Text } from 'react-native'; | |
| import { AppNavigator} from './navigator'; | |
| import MyProvider from './Provider'; | |
| export default () => ( | |
| <MyProvider> | |
| <View style={styles.container}> | |
| <AppNavigator /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { AsyncStorage } from 'react-native'; | |
| export const MyContext = React.createContext(); | |
| export default class MyProvider extends Component { | |
| state = { | |
| token: '', | |
| saveToken: async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { | |
| AsyncStorage, | |
| Button, | |
| StatusBar, | |
| StyleSheet, | |
| View, | |
| Text, | |
| } from 'react-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { | |
| ActivityIndicator, | |
| AsyncStorage, | |
| StatusBar, | |
| StyleSheet, | |
| View, | |
| } from 'react-native'; | |
| import { connect } from 'react-redux'; | |
| import { getUserToken } from '../actions'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { combineReducers } from 'redux'; | |
| const rootReducer = (state = { | |
| token: {}, | |
| loading: true, | |
| error: null, | |
| }, action) => { | |
| switch (action.type) { | |
| case 'GET_TOKEN': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AsyncStorage } from 'react-native'; | |
| export const getToken = (token) => ({ | |
| type: 'GET_TOKEN', | |
| token, | |
| }); | |
| export const saveToken = token => ({ | |
| type: 'SAVE_TOKEN', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <MapView | |
| ref={c => this.mapView = c} | |
| style={{ | |
| position: 'absolute', | |
| top: 0, | |
| left: 0, | |
| bottom: 0, | |
| right: 0, | |
| }} | |
| provider="google" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { View, Text, TouchableOpacity, TextInput, TouchableWithoutFeedback, Keyboard, Animated, Image } from 'react-native'; | |
| // import { connect } from 'react-redux'; | |
| import Spinner from '../components/Spinner'; | |
| import * as API from '../utils/api'; | |
| class EnterCode extends React.Component { | |
| static navigationOptions = { | |
| title: 'Enter Code', | |
| headerTintColor: 'black', |