diff --git a/navigation.js b/navigation.js index a475881..66262f9 100644 --- a/navigation.js +++ b/navigation.js @@ -1,6 +1,7 @@ import * as React from 'react'; import {NavigationContainer} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; +import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import Splash from './src/screens/Splash'; import Home from './src/screens/Home'; import Login from './src/screens/Login'; @@ -10,16 +11,51 @@ import Products from './src/screens/Products'; import ShoppingCart from './src/screens/ShoppingCart'; import QR from './src/screens/QR/index'; import {connect} from 'react-redux'; +import i18n from "./src/services/i18n"; +import {useTranslation} from "react-i18next"; +import Profile from "./src/screens/Profile"; const mapStateToProps = state => { return { profile: state.profile, + config: state.config, }; }; const Stack = createNativeStackNavigator(); +const Tab = createBottomTabNavigator(); + +function BottomTab(props) { + + const {t} = useTranslation('translation', {keyPrefix: 'main'}); + + return ( + + + + + + + + ) +} function Navigator(props) { + + React.useEffect(() => { + i18n.changeLanguage(props.config.lan) + }, [props.config]) + return ( @@ -28,21 +64,17 @@ function Navigator(props) { name="Splash" component={Splash} /> - <> - - - - <> - - + + +