|
|
|
@ -4,8 +4,7 @@ import {createNativeStackNavigator} from '@react-navigation/native-stack'; |
|
|
|
|
import Splash from './src/screens/Splash'; |
|
|
|
|
import Home from './src/screens/Home'; |
|
|
|
|
import Login from './src/screens/Login'; |
|
|
|
|
import Otp from './src/screens/Otp'; |
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
import Otp from "./src/screens/Otp"; |
|
|
|
|
import Product from './src/screens/Product'; |
|
|
|
|
import Products from './src/screens/Products'; |
|
|
|
|
import ShoppingCart from './src/screens/ShoppingCart'; |
|
|
|
@ -17,20 +16,10 @@ const mapStateToProps = state => { |
|
|
|
|
profile: state.profile, |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
======= |
|
|
|
|
import {connect} from 'react-redux'; |
|
|
|
|
|
|
|
|
|
const mapStateToProps = state => { |
|
|
|
|
return { |
|
|
|
|
profile: state.profile |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
>>>>>>> 93c1e23879a6378e3a83f8947b0d8051717854b3 |
|
|
|
|
|
|
|
|
|
const Stack = createNativeStackNavigator(); |
|
|
|
|
|
|
|
|
|
function Navigator(props) { |
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
return ( |
|
|
|
|
<NavigationContainer> |
|
|
|
|
<Stack.Navigator> |
|
|
|
@ -39,7 +28,6 @@ function Navigator(props) { |
|
|
|
|
name="Splash" |
|
|
|
|
component={Splash} |
|
|
|
|
/> |
|
|
|
|
{!props.profile.token ? ( |
|
|
|
|
<> |
|
|
|
|
<Stack.Screen |
|
|
|
|
name="Login" |
|
|
|
@ -52,11 +40,9 @@ function Navigator(props) { |
|
|
|
|
options={{headerShown: false}} |
|
|
|
|
/> |
|
|
|
|
</> |
|
|
|
|
) : ( |
|
|
|
|
<> |
|
|
|
|
<Stack.Screen name="Home" component={Home} /> |
|
|
|
|
<Stack.Screen name="Home" component={Home}/> |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
<Stack.Screen |
|
|
|
|
name="Product" |
|
|
|
|
component={Product} |
|
|
|
@ -80,18 +66,6 @@ function Navigator(props) { |
|
|
|
|
</Stack.Navigator> |
|
|
|
|
</NavigationContainer> |
|
|
|
|
); |
|
|
|
|
======= |
|
|
|
|
return ( |
|
|
|
|
<NavigationContainer> |
|
|
|
|
<Stack.Navigator> |
|
|
|
|
<Stack.Screen options={{headerShown: false}} name="Splash" component={Splash}/> |
|
|
|
|
<Stack.Screen name="Login" component={Login} options={{headerShown: false}}/> |
|
|
|
|
<Stack.Screen name="Otp" component={Otp} options={{headerShown: false}}/> |
|
|
|
|
<Stack.Screen name="Home" component={Home}/> |
|
|
|
|
</Stack.Navigator> |
|
|
|
|
</NavigationContainer> |
|
|
|
|
); |
|
|
|
|
>>>>>>> 93c1e23879a6378e3a83f8947b0d8051717854b3 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(Navigator); |
|
|
|
|