/** * Sample React Native App * https://github.com/facebook/react-native * * @format * @flow strict-local */ import React from 'react'; import {StyleSheet, ScrollView, View, Text, StatusBar} from 'react-native'; import {SafeAreaProvider} from 'react-native-safe-area-context'; import {colors} from './src/assets/styles/colors-theme'; import Router from './router'; import {Provider} from 'mobx-react'; import Store from './src/stores/index'; import {NavigationContainer, useFocusEffect} from '@react-navigation/native'; import {createStackNavigator, HeaderBackButton} from '@react-navigation/stack'; import {createMaterialBottomTabNavigator} from '@react-navigation/material-bottom-tabs'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import { Header, LearnMoreLinks, Colors, DebugInstructions, ReloadInstructions, } from 'react-native/Libraries/NewAppScreen'; import Icon from 'react-native-vector-icons/dist/MaterialCommunityIcons'; import SplashScreen from './src/pages/splash/splashScreen'; import Main from './src/pages/main/main'; import buyHistory from './src/pages/buyHistory/buyHistory'; import Favorite from './src/pages/favorite/favorite'; import Profile from './src/pages/profile/profile'; import BuyHistory from './src/pages/buyHistory/buyHistory'; Icon.loadFont(); console.disableYellowBox = true; const Stack = createStackNavigator(); const BottomTab = createBottomTabNavigator(); const BottomTabScreen = () => ( ({ tabBarIcon: ({focused, color, size}) => { let iconName; switch (route.name) { case 'Main': iconName = 'home-variant'; break; case 'BuyHistory': iconName = 'cart'; break; case 'Favorite': iconName = 'heart'; break; case 'Profile': iconName = 'account-circle'; break; } return ( ); }, })} tabBarOptions={{ activeTintColor: 'tomato', inactiveTintColor: 'gray', }}> ); const App: () => React$Node = () => { return ( <> Store.appStore.setRouterState(state)} ref={navigatorRef => Store.appStore.setRouterRef(navigatorRef)}> ); }; const styles = StyleSheet.create({ scrollView: { backgroundColor: Colors.lighter, }, engine: { position: 'absolute', right: 0, }, body: { backgroundColor: Colors.white, }, sectionContainer: { marginTop: 32, paddingHorizontal: 24, }, sectionTitle: { fontSize: 24, fontWeight: '600', color: Colors.black, }, sectionDescription: { marginTop: 8, fontSize: 18, fontWeight: '400', color: Colors.dark, }, highlight: { fontWeight: '700', }, footer: { color: Colors.dark, fontSize: 12, fontWeight: '600', padding: 4, paddingRight: 12, textAlign: 'right', }, }); export default App;