Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { View, Dimensions, Image, TouchableWithoutFeedback } from 'react-native';
  3. import { Button, Icon } from 'native-base';
  4. import { createStackNavigator } from 'react-navigation';
  5.  
  6. import Home from '../pages/Home';
  7. import AdvertisingDetail from '../pages/AdvertisingDetail';
  8. import CategoryDetail from '../pages/CategoryDetail';
  9. import CategoryHomeDetail from '../pages/CategoryHomeDetail';
  10. import DrugDetail from '../pages/DrugDetail';
  11. import Search from '../pages/Search';
  12. import Preference from '../pages/Preference';
  13. import DeliveryLocation from '../pages/DeliveryLocation';
  14. import DeliveryRule from '../pages/DeliveryRule';
  15. import OrderRule from '../pages/OrderRule';
  16. import Faq from '../pages/Faq';
  17. import Feedback from '../pages/Feedback';
  18. import Contact from '../pages/Contact';
  19. import Cart from '../pages/Cart';
  20. import Password from '../pages/Password';
  21. import Authentication from '../pages/Authentication';
  22. import Edit from '../pages/Edit';
  23. import Account from '../pages/Account';
  24. import OrderList from '../pages/OrderList';
  25. import OrderDetailList from '../pages/OrderDetailList';
  26. import Order from '../pages/Order';
  27.  
  28. import CategoryList from '../containers/CategoryList';
  29. import SubCategoryList from '../containers/SubCategoryList';
  30. import SuccessInfo from '../containers/SuccessInfo';
  31.  
  32. import NavigationService from './NavigationService';
  33. import Icon1 from 'react-native-vector-icons/MaterialCommunityIcons';
  34.  
  35. const AuthStack = createStackNavigator(
  36.     {
  37.         Home: { screen: Home, navigationOptions: () => ({ title: '' }) },
  38.         AdvertisingDetail: { screen: AdvertisingDetail, navigationOptions: () => ({ title: '' }) },
  39.         CategoryDetail: { screen: CategoryDetail, navigationOptions: () => ({ title: '' }) },
  40.         CategoryHomeDetail: { screen: CategoryHomeDetail, navigationOptions: () => ({ title: '' }) },
  41.         DrugDetail: { screen: DrugDetail, navigationOptions: () => ({ title: '' }) },
  42.         Preference: { screen: Preference, navigationOptions: () => ({ title: '' }) },
  43.         DeliveryLocation: { screen: DeliveryLocation, navigationOptions: () => ({ title: '' }) },
  44.         DeliveryRule: { screen: DeliveryRule, navigationOptions: () => ({ title: '' }) },
  45.         OrderRule: { screen: OrderRule, navigationOptions: () => ({ title: '' }) },
  46.         Faq: { screen: Faq, navigationOptions: () => ({ title: '' }) },
  47.         Feedback: { screen: Feedback, navigationOptions: () => ({ title: '' }) },
  48.         Contact: { screen: Contact, navigationOptions: () => ({ title: '' }) },
  49.         Cart: { screen: Cart, navigationOptions: () => ({ title: '' }) },
  50.         Password: { screen: Password, navigationOptions: () => ({ title: '' }) },
  51.         Authentication: { screen: Authentication, navigationOptions: () => ({ header: null }) },
  52.         Edit: { screen: Edit, navigationOptions: () => ({ title: '' }) },
  53.         Account: { screen: Account, navigationOptions: () => ({ title: '' }) },
  54.         OrderList: { screen: OrderList, navigationOptions: () => ({ title: '' }) },
  55.         OrderDetailList: { screen: OrderDetailList, navigationOptions: () => ({ title: '' }) },
  56.         Order: { screen: Order, navigationOptions: () => ({ title: '' }) },
  57.         Search: { screen: Search, navigationOptions: () => ({ header: null }) },
  58.         CategoryList: { screen: CategoryList, navigationOptions: () => ({ header: null }) },
  59.         SubCategoryList: { screen: SubCategoryList, navigationOptions: () => ({ header: null }) },
  60.         SuccessInfo: { screen: SuccessInfo, navigationOptions: () => ({ header: null }) }
  61.     },
  62.     {
  63.         defaultNavigationOptions: {
  64.             headerStyle: {
  65.                 backgroundColor: '#F5F6F8',
  66.                 elevation: 0
  67.             },
  68.             headerTintColor: '#fff',
  69.             headerTitleStyle: {
  70.                 color: '#fff',
  71.                 width: (Dimensions.get('window').width) / 2
  72.             },
  73.             headerLeft: (
  74.                 <View style={{ flex: 1, flexDirection: 'row' }}>
  75.                     <Button onPress={() => NavigationService.navigate('CategoryList')} transparent>
  76.                         <Icon name='md-menu' size={25} style={{ color: '#70BE44' }} />
  77.                     </Button>
  78.                     <TouchableWithoutFeedback onPress={() => NavigationService.navigate('Home')}>
  79.                         <Image source={{ uri: 'https://melhem.az//uploads/settings/04d08bd7eeae5e5af03e12a2322d50d8.png' }} style={{ marginTop: 7, width: 100, height: 30 }} />
  80.                     </TouchableWithoutFeedback>
  81.                 </View>
  82.             ),
  83.             headerRight: (
  84.                 <View style={{ flex: 1, flexDirection: 'row' }}>
  85.                     <Button transparent onPress={() => NavigationService.navigate('Search')}>
  86.                         <Icon name='search' size={25} style={{ color: '#333' }} />
  87.                     </Button>
  88.                     <Button badge transparent onPress={() => NavigationService.navigate('Cart')}>
  89.                         <Icon1 name='cart-outline' size={25} style={{ color: '#333' }} />
  90.                     </Button>
  91.                     <Button transparent onPress={() => NavigationService.navigate('Preference')}>
  92.                         <Icon name='md-person' size={25} style={{ color: '#333' }} />
  93.                     </Button>
  94.                 </View>
  95.             ),
  96.         }
  97.     });
  98. export default AuthStack;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement