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, Alert, TouchableOpacity, ScrollView } from "react-native"; | |
//Import required react-navigation component | |
import { | |
createDrawerNavigator, | |
createStackNavigator, | |
createAppContainer, | |
createSwitchNavigator, | |
DrawerItems, |
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 Icon from "react-native-vector-icons/Ionicons"; | |
import firebase from "react-native-firebase"; | |
import { createAppContainer } from "react-navigation"; | |
import NavTabs from "./ProviderTabs/NabTabs"; | |
import { View, Text, StyleSheet, TouchableOpacity, Image } from "react-native"; | |
console.disableYellowBox = true; | |
class ProviderProfile extends Component { |
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
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target 'khadamaty' do | |
# Comment the next line if you don't want to use dynamic frameworks | |
# use_frameworks! | |
# Pods for khadamaty | |
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios' |
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
_recommendedProvider = () => { | |
let Recommended = []; | |
firebase | |
.database() | |
.ref('recommendationProviders') | |
.once('value') | |
.then(snapshot => { | |
snapshot.forEach(childSnapshot => { | |
Recommended.push({ | |
gKey: childSnapshot.key, |
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
JSON value "5" of type NSNumber cannot be converted to Nsstring | |
log item in FlatList more than 4 item maybe 20 |
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
const updateMobile = async () => { | |
const snapshot = await auth() | |
.verifyPhoneNumber(mobile) | |
.on('state_changed', phoneAuthSnapshot => { | |
console.log('Snapshot state: ', phoneAuthSnapshot.state); | |
}); | |
const credential = auth.PhoneAuthProvider.credential( | |
snapshot.verificationId, | |
snapshot.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
handleNearby = () => { | |
const {region, providersCat} = this.state; // my region , all users | |
// console.log(providersCat); | |
let currentPoint = [region.longitude, region.latitude]; | |
let points = _.map(providersCat, p => { | |
const to = [p.coordinates.longitude, p.coordinates.latitude]; | |
const distances = distance(currentPoint, to, {units: 'kilometers'}); | |
// console.log("@Distance", distances); | |
// console.log("@P", p); | |
// console.log(p.username); |
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
// scripts/Clear.sh | |
#!/bin/bash | |
echo "rm -rf ios/build..." | |
rm -rf ios/build | |
echo "rm -rf android/app/build..." | |
rm -rf android/app/build | |
echo "Removed all Xcode derived data..." |
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 {createAppContainer} from 'react-navigation'; | |
import {createBottomTabNavigator} from 'react-navigation-tabs'; | |
{/* | |
.. | |
Screens | |
..*/} | |
const LoginTabs = createBottomTabNavigator( | |
{ |