This file contains 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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React from 'react'; | |
import RootController from './src/components/Drawer/RootController' |
This file contains 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, Dimensions, Image } from 'react-native'; | |
class FoodItem extends Component { | |
render() { | |
const { title, image, address, city, rating, status, key } = this.props.item | |
return ( | |
<View style={styles.container}> |
This file contains 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 { Text, View, StatusBar, FlatList, Dimensions, Image, TextInput, TouchableOpacity } from 'react-native'; | |
import FoodItem from './FoodItem'; | |
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; | |
const { height, width } = Dimensions.get('window'); |
This file contains 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, ImageBackground, Dimensions } from 'react-native'; | |
const { height, width } = Dimensions.get('window'); | |
class HomeItems extends Component { | |
sendToLoginScreen() { | |
this.props.nav.push('Login'); |
This file contains 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 { Text, View, StatusBar, FlatList, Dimensions, Image } from 'react-native'; | |
import HomeItems from './HomeItems'; | |
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; | |
import { TouchableOpacity } from 'react-native-gesture-handler'; | |
const foods = [ | |
{ |
This file contains 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 { Icon, Thumbnail } from 'native-base'; | |
import React, { Component } from 'react' | |
import { StyleSheet, SafeAreaView, StatusBar, Text, Alert, Dimensions, TouchableOpacity, View, FlatList } from 'react-native' | |
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; | |
const arrMenu = [ | |
{ 'id': 0, name: 'Home', 'icon': 'home-outline', 'navScreen': 'HomeScreen' }, | |
{ 'id': 1, name: 'Favourite', 'icon': 'heart-multiple-outline', 'navScreen': 'FavouriteScreen' }, | |
{ 'id': 2, name: 'Messages', 'icon': 'comment-text-multiple', 'navScreen': 'MessagesScreen' }, |
This file contains 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 { createDrawerNavigator } from 'react-navigation-drawer'; | |
import { createStackNavigator } from 'react-navigation-stack'; | |
import { Dimensions } from 'react-native' | |
import HomeScreen from '../Home/HomeScreen' | |
import FoodList from '../Favourite/FoodList' | |
import DrawerMenu from './Drawer' | |
const { width: screenWidth, height: screenHeight } = Dimensions.get('window'); |