Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ScrollableTabView
- style={{marginTop: 0, backgroundColor: '#1C4747', }}
- tabBarUnderlineStyle={{backgroundColor: "#fff"}}
- tabBarActiveTextColor={"#fff"}
- tabBarInactiveTextColor={"#ccc"}
- initialPage={0}
- renderTabBar={() => <DefaultTabBar />}
- >
- <RotaEntrega tabLabel='ROTA' />
- <ChildOne tabLabel='ORDENS' text='ORDENS' size={17} weight="500" />
- <ChildTwo tabLabel='HISTÓRICO' text='HISTÓRICO' size={17} weight="500" />
- </ScrollableTabView>
- _route = async(codDriver) => {
- const apiCall = await fetch(`http://urlaqui.com.br/testes/api.php?driver=${codDriver}`);
- const response = await apiCall.json();
- let latLongObj = {
- latitude: parseFloat(response.os[0].address.latitude),
- longitude: parseFloat(response.os[0].address.longitude)
- };
- this.setState({
- route: response.success ? [ response.os[0] ] : [], //only first route in the list
- routeFound: response.success,
- orders: response.success ? response.os : [], //and put the all orders to this array
- destination: latLongObj
- });
- };
- componentDidMount(){
- this._route("51ds515");
- }
Add Comment
Please, Sign In to add comment