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 { | |
View, | |
Text, | |
FlatList, | |
StyleSheet, | |
TouchableHighlight | |
} from 'react-native'; | |
// .. rest of code |
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 { StyleSheet, Text, View } from 'react-native'; | |
import AutoCompleteBox from '../components/AutoCompleteBox'; | |
import AutoCompleteResultList from '../components/AutoCompleteResultList'; | |
import { getPredictionWithDetail } from '../services.js'; | |
const KEY = 'Y_API_KEY'; | |
class SearchBox extends Component { | |
constructor(props) { |
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 { View } from 'react-native'; | |
import SearchBox from './SearchBox'; | |
class PickupPage extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
pickupCoordinate: null, | |
dropCoordinate: null |
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, Text, View } from 'react-native'; | |
import Pickup from './src/containers/PickupPage'; | |
export default class App extends React.Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Pickup /> | |
</View> |
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
//rest of code | |
const styles = StyleSheet.create({ | |
FloatingContainer: { | |
position: 'absolute', | |
alignSelf: 'stretch', | |
top: 55, | |
left: 0, | |
right: 0, | |
marginHorizontal: 22, | |
borderWidth: 2, |
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 { View, Alert } from 'react-native'; | |
import { MapView } from 'expo'; | |
class PickupMapView extends Component { | |
render() { | |
console.log(this.state); | |
return ( | |
<MapView | |
style={{ flex: 1 }} |
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 { View } from 'react-native'; | |
import SearchBox from './SearchBox'; | |
import PickupMapView from './PickupMapView'; | |
class PickupPage extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
pickupCoordinate: null, |
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
//rest of package.json | |
"scripts": { | |
"start": "node node_modules/react-native/local-cli/cli.js start", | |
"test": "jest", | |
"spec": | |
"jest --testPathPattern helpers.spec.js --testPathIgnorePatterns node_modules" | |
}, | |
//rest of package.json | |
"jest": { | |
"preset": "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 MyService from './api'; | |
const service = new MyService(); | |
describe('MY API Service', () => { | |
let data; | |
beforeEach(async () => { | |
const currentUser = { | |
firstName: 'My', | |
lastName: 'Name', |