NewFeed.js 1.88 KB
Newer Older
Giang Tran committed
1 2 3 4 5
import React, {Component} from 'react';
import {View, Text, StatusBar, SafeAreaView} from 'react-native';
import {getFontXD, HEIGHT, WIDTHXD} from '../../Config/Functions';
import Tab1 from './Tab1/Tab1';
import Tab2 from './Tab2/Tab2';
Giang Tran committed
6 7
import Media from './Media/Media';
import Trading from './Tradding/Tradding';
Giang Tran committed
8
import Calendar from './Calendar/Calendar';
Giang Tran committed
9
import I18n from '../../helper/i18/i18n';
Giang Tran committed
10 11 12

import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
const Tab = createMaterialTopTabNavigator();
Giang Tran committed
13
import HeaderDrawer from '../../components/Header/HeaderDrawer';
Giang Tran committed
14 15 16 17

const NewFeed = (props) => {
  return (
    <View style={{flex: 1}}>
Giang Tran committed
18
      <HeaderDrawer title={'News'} isWhite={true} />
Giang Tran committed
19
      <View style={{flex: 1, backgroundColor: 'white'}}>
Giang Tran committed
20
        <Tab.Navigator
Giang Tran committed
21
          initialRouteName="GeneralInfor"
Giang Tran committed
22
          swipeEnabled={false}
Giang Tran committed
23
          tabBarOptions={{
Giang Tran committed
24
            scrollEnabled: true,
Giang Tran committed
25 26
            inactiveTintColor: '#929292',
            activeTintColor: '#1473E6',
Giang Tran committed
27
            labelStyle: {fontSize: getFontXD(36)},
Giang Tran committed
28 29 30 31 32
            style: {backgroundColor: 'white'},
          }}>
          <Tab.Screen
            name="Tab1"
            component={Tab1}
Giang Tran committed
33
            options={{tabBarLabel: I18n.t('News')}}
Giang Tran committed
34 35 36
          />
          <Tab.Screen
            name="Tab2"
Giang Tran committed
37
            component={Media}
Giang Tran committed
38 39 40 41 42
            options={{tabBarLabel: 'Media'}}
          />
          <Tab.Screen
            name="Tab3"
            component={Tab2}
Giang Tran committed
43
            options={{tabBarLabel: I18n.t('PriceTable')}}
Giang Tran committed
44 45 46
          />
          <Tab.Screen
            name="Tab4"
Giang Tran committed
47
            component={Trading}
Giang Tran committed
48
            options={{tabBarLabel: I18n.t('Chart')}}
Giang Tran committed
49
          />
50 51 52
          <Tab.Screen
            name="CALENDAR"
            component={Calendar}
Giang Tran committed
53
            options={{tabBarLabel: I18n.t('Calendar')}}
54
          />
Giang Tran committed
55
        </Tab.Navigator>
Giang Tran committed
56
      </View>
Giang Tran committed
57 58 59 60 61
    </View>
  );
};

export default NewFeed;