Skip to content

Instantly share code, notes, and snippets.

View anastely's full-sized avatar
:octocat:
Focusing

Anas Tely anastely

:octocat:
Focusing
View GitHub Profile
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,
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 {
# 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'
_recommendedProvider = () => {
let Recommended = [];
firebase
.database()
.ref('recommendationProviders')
.once('value')
.then(snapshot => {
snapshot.forEach(childSnapshot => {
Recommended.push({
gKey: childSnapshot.key,
@anastely
anastely / Errors
Last active October 19, 2019 11:27
JSON value "5" of type NSNumber cannot be converted to Nsstring
log item in FlatList more than 4 item maybe 20
@anastely
anastely / Update.js
Last active November 24, 2019 19:07
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,
);
import React from 'react';
import Ionicons from 'react-native-vector-icons/Ionicons';
import {createAppContainer, createSwitchNavigator} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';
import {createBottomTabNavigator} from 'react-navigation-tabs';
import HomeIcon from '../assets/TabIcons/HomeIcon';
// Icons
import OrdersIcon from '../assets/TabIcons/OrdersIcon';
import ProfileIcon from '../assets/TabIcons/ProfileIcon';
import ReportsIcon from '../assets/TabIcons/ReportsIcon';
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);
// 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..."
import {createAppContainer} from 'react-navigation';
import {createBottomTabNavigator} from 'react-navigation-tabs';
{/*
..
Screens
..*/}
const LoginTabs = createBottomTabNavigator(
{