master
hamed 3 years ago
parent 6b1dbe8e65
commit ce1b2578cf
  1. 14
      ios/Podfile.lock
  2. 4
      ios/RnDanovin.xcodeproj/project.pbxproj
  3. 114
      navigation.js
  4. 12746
      package-lock.json
  5. 4
      src/screens/Home/components/2d.js
  6. 4
      src/screens/Home/components/3d.js
  7. 12
      src/screens/Home/components/Identifier.js
  8. 9
      src/screens/Home/components/shop.js
  9. 4
      src/screens/Home/index.js
  10. 6
      src/screens/Product/index.js
  11. 2
      src/screens/Products/Card/index.js
  12. 4
      src/screens/Splash/index.js

@ -341,11 +341,11 @@ PODS:
- React-jsi (= 0.66.0)
- React-logger (= 0.66.0)
- React-perflogger (= 0.66.0)
- RNCAsyncStorage (1.15.11):
- RNCAsyncStorage (1.15.9):
- React-Core
- RNDeviceInfo (8.4.5):
- React-Core
- RNScreens (3.9.0):
- RNScreens (3.8.0):
- React-Core
- React-RCTImage
- RNVectorIcons (8.1.0):
@ -537,8 +537,8 @@ SPEC CHECKSUMS:
React-jsiexecutor: 6a05173dc0142abc582bd4edd2d23146b8cc218a
React-jsinspector: be95ad424ba9f7b817aff22732eb9b1b810a000a
React-logger: 9a9cd87d4ea681ae929b32ef580638ff1b50fb24
react-native-restart: 733a51ad137f15b0f8dc34c4082e55af7da00979
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
react-native-restart: d4ea7637e193da7558d229b3704d500ec0d75f9c
react-native-safe-area-context: 5cf05f49df9d17261e40e518481f2e334c6cd4b5
React-perflogger: 1f554c2b684e2f484f9edcdfdaeedab039fbaca8
React-RCTActionSheet: 610d5a5d71ab4808734782c8bca6a12ec3563672
React-RCTAnimation: ec6ed97370ace32724c253f29f0586cafcab8126
@ -551,9 +551,9 @@ SPEC CHECKSUMS:
React-RCTVibration: 53b92d54b923283638cb0186da7a5c2d2b70a49b
React-runtimeexecutor: 4bb657a97aa74568d9ed634c8bd478299bb8a3a6
ReactCommon: eb059748e842a1a86025ebbd4ac9d99e74492f88
RNCAsyncStorage: eb05c0284dd6b50b32f92fad55e2a41e03358c43
RNDeviceInfo: ec64a28e7ddf30399f34c04708fdf702560d083a
RNScreens: 4d79118be80f79fa1f4aa131909a1d6e86280af3
RNCAsyncStorage: d599364c12b1ddb042cc2d7ab6f8258962b83097
RNDeviceInfo: 3b3bbe00f478907223daa580b6882f0bae162f72
RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

@ -627,7 +627,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@ -693,7 +693,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

@ -4,94 +4,68 @@ 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';
import QR from './src/screens/QR/index';
import {connect} from 'react-redux';
const mapStateToProps = state => {
return {
profile: state.profile,
};
};
=======
import {connect} from 'react-redux';
const mapStateToProps = state => {
return {
profile: state.profile
}
}
>>>>>>> 93c1e23879a6378e3a83f8947b0d8051717854b3
profile: state.profile,
};
};
const Stack = createNativeStackNavigator();
function Navigator(props) {
<<<<<<< HEAD
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
options={{headerShown: false}}
name="Splash"
component={Splash}
/>
{!props.profile.token ? (
<>
<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.Screen
name="Product"
component={Product}
options={{headerShown: false}}
/>
<Stack.Screen
name="Products"
component={Products}
options={{headerShown: false}}
/>
<Stack.Screen
name="QR"
component={QR}
options={{headerShown: true}}
/>
<Stack.Screen
name="سبد خرید"
component={ShoppingCart}
options={{headerShown: true}}
/>
</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.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.Screen
name="Product"
component={Product}
options={{headerShown: false}}
/>
<Stack.Screen
name="Products"
component={Products}
options={{headerShown: false}}
/>
<Stack.Screen
name="QR"
component={QR}
options={{headerShown: true}}
/>
<Stack.Screen
name="سبد خرید"
component={ShoppingCart}
options={{headerShown: true}}
/>
</Stack.Navigator>
</NavigationContainer>
);
>>>>>>> 93c1e23879a6378e3a83f8947b0d8051717854b3
}
export default connect(mapStateToProps)(Navigator);

12746
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -2,11 +2,11 @@ import React from "react";
import { View, StyleSheet, Dimensions } from "react-native";
import Identifier from "./Identifier";
function component2D({ list, flexDirection }) {
function component2D({ list, flexDirection, navigation }) {
return (
<View style={[styles.container, { flexDirection: flexDirection }]}>
{list.map((item, i) => (
<Identifier {...item} key={i} />
<Identifier navigation={navigation} {...item} key={i} />
))}
</View>
);

@ -2,11 +2,11 @@ import React from "react";
import { View, StyleSheet, Dimensions } from "react-native";
import Identifier from "./Identifier";
function component3D({ list }) {
function component3D({ list, navigation }) {
return (
<View style={styles.container}>
{list.map((item, i) => (
<Identifier {...item} key={i} />
<Identifier navigation={navigation} {...item} key={i} />
))}
</View>
);

@ -10,24 +10,24 @@ const Identifier = (item) => {
let component;
switch (item.name) {
case "carousel":
component = <Carousel list={item.list} />;
component = <Carousel navigation={item.navigation} list={item.list} />;
break;
case "2d":
component = (
<Component2D list={item.items} flexDirection={item.flexDirection} />
<Component2D navigation={item.navigation} list={item.items} flexDirection={item.flexDirection} />
);
break;
case "3d":
component = <Component3D list={item.items} />;
component = <Component3D navigation={item.navigation} list={item.items} />;
break;
case "flex-around":
component = <FlexAround item={item} />;
component = <FlexAround navigation={item.navigation} item={item} />;
break;
case "background-tile":
component = <BackgroundTile item={item} />;
component = <BackgroundTile navigation={item.navigation} item={item} />;
break;
case "shop":
component = <Shop item={item} />;
component = <Shop navigation={item.navigation} item={item} />;
break;
default:
component = null;

@ -1,9 +1,10 @@
import React from "react";
import { StyleSheet, View, Text, Image } from "react-native";
import {StyleSheet, View, Text, Image, TouchableOpacity} from "react-native";
const Shop = ({ item }) => {
const Shop = ({ item, navigation }) => {
return (
<View
<TouchableOpacity
onPress={() => navigation.navigate('Products')}
style={[
styles.container,
{ flex: item.flex, backgroundColor: item.backgroundColor }
@ -18,7 +19,7 @@ const Shop = ({ item }) => {
</View>
))}
</View>
</View>
</TouchableOpacity>
);
};

@ -4,11 +4,11 @@ import data from "./data";
import Identifier from "./components/Identifier";
// Within your render function
function Home() {
function Home(props) {
return (
<ScrollView contentContainerStyle={styles.contentContainerStyle} style={styles.container}>
{data?.map((item, i) => (
<Identifier {...item} key={i} />
<Identifier navigation={props.navigation} {...item} key={i} />
))}
</ScrollView>
);

@ -125,13 +125,13 @@ var styles = StyleSheet.create({
productName: {
marginTop: 8,
fontSize: 26,
fontWeight: 600,
fontWeight: '600',
color: Colors.green,
},
productGrade: {
marginTop: 10,
fontSize: 12,
fontWeight: 600,
fontWeight: '600',
color: 'black',
},
addToCart: {
@ -172,7 +172,7 @@ var styles = StyleSheet.create({
fontSize: 18,
marginBottom: 5,
marginTop: 10,
fontWeight: 600,
fontWeight: '600',
textAlign: 'right',
},
bookOptions: {

@ -77,7 +77,7 @@ var styles = StyleSheet.create({
productName: {
marginTop: 10,
fontSize: 20,
fontWeight: 600,
fontWeight: '600',
},
});

@ -17,9 +17,7 @@ function Splash({navigation, profile}) {
setTimeout(() => {
!profile.accessToken ? navigation.reset({
index: 0,
// routes: [{ name: 'Login' }],
routes: [{ name: 'QR' }],
routes: [{ name: 'Login' }],
}) : navigation.reset({
index: 0,
routes: [{ name: 'Home' }],

Loading…
Cancel
Save