master
hamed 3 years ago
parent 6b1dbe8e65
commit ce1b2578cf
  1. 14
      ios/Podfile.lock
  2. 4
      ios/RnDanovin.xcodeproj/project.pbxproj
  3. 30
      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-jsi (= 0.66.0)
- React-logger (= 0.66.0) - React-logger (= 0.66.0)
- React-perflogger (= 0.66.0) - React-perflogger (= 0.66.0)
- RNCAsyncStorage (1.15.11): - RNCAsyncStorage (1.15.9):
- React-Core - React-Core
- RNDeviceInfo (8.4.5): - RNDeviceInfo (8.4.5):
- React-Core - React-Core
- RNScreens (3.9.0): - RNScreens (3.8.0):
- React-Core - React-Core
- React-RCTImage - React-RCTImage
- RNVectorIcons (8.1.0): - RNVectorIcons (8.1.0):
@ -537,8 +537,8 @@ SPEC CHECKSUMS:
React-jsiexecutor: 6a05173dc0142abc582bd4edd2d23146b8cc218a React-jsiexecutor: 6a05173dc0142abc582bd4edd2d23146b8cc218a
React-jsinspector: be95ad424ba9f7b817aff22732eb9b1b810a000a React-jsinspector: be95ad424ba9f7b817aff22732eb9b1b810a000a
React-logger: 9a9cd87d4ea681ae929b32ef580638ff1b50fb24 React-logger: 9a9cd87d4ea681ae929b32ef580638ff1b50fb24
react-native-restart: 733a51ad137f15b0f8dc34c4082e55af7da00979 react-native-restart: d4ea7637e193da7558d229b3704d500ec0d75f9c
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057 react-native-safe-area-context: 5cf05f49df9d17261e40e518481f2e334c6cd4b5
React-perflogger: 1f554c2b684e2f484f9edcdfdaeedab039fbaca8 React-perflogger: 1f554c2b684e2f484f9edcdfdaeedab039fbaca8
React-RCTActionSheet: 610d5a5d71ab4808734782c8bca6a12ec3563672 React-RCTActionSheet: 610d5a5d71ab4808734782c8bca6a12ec3563672
React-RCTAnimation: ec6ed97370ace32724c253f29f0586cafcab8126 React-RCTAnimation: ec6ed97370ace32724c253f29f0586cafcab8126
@ -551,9 +551,9 @@ SPEC CHECKSUMS:
React-RCTVibration: 53b92d54b923283638cb0186da7a5c2d2b70a49b React-RCTVibration: 53b92d54b923283638cb0186da7a5c2d2b70a49b
React-runtimeexecutor: 4bb657a97aa74568d9ed634c8bd478299bb8a3a6 React-runtimeexecutor: 4bb657a97aa74568d9ed634c8bd478299bb8a3a6
ReactCommon: eb059748e842a1a86025ebbd4ac9d99e74492f88 ReactCommon: eb059748e842a1a86025ebbd4ac9d99e74492f88
RNCAsyncStorage: eb05c0284dd6b50b32f92fad55e2a41e03358c43 RNCAsyncStorage: d599364c12b1ddb042cc2d7ab6f8258962b83097
RNDeviceInfo: ec64a28e7ddf30399f34c04708fdf702560d083a RNDeviceInfo: 3b3bbe00f478907223daa580b6882f0bae162f72
RNScreens: 4d79118be80f79fa1f4aa131909a1d6e86280af3 RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4 RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720 Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

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

@ -4,8 +4,7 @@ import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Splash from './src/screens/Splash'; import Splash from './src/screens/Splash';
import Home from './src/screens/Home'; import Home from './src/screens/Home';
import Login from './src/screens/Login'; import Login from './src/screens/Login';
import Otp from './src/screens/Otp'; import Otp from "./src/screens/Otp";
<<<<<<< HEAD
import Product from './src/screens/Product'; import Product from './src/screens/Product';
import Products from './src/screens/Products'; import Products from './src/screens/Products';
import ShoppingCart from './src/screens/ShoppingCart'; import ShoppingCart from './src/screens/ShoppingCart';
@ -17,20 +16,10 @@ const mapStateToProps = state => {
profile: state.profile, profile: state.profile,
}; };
}; };
=======
import {connect} from 'react-redux';
const mapStateToProps = state => {
return {
profile: state.profile
}
}
>>>>>>> 93c1e23879a6378e3a83f8947b0d8051717854b3
const Stack = createNativeStackNavigator(); const Stack = createNativeStackNavigator();
function Navigator(props) { function Navigator(props) {
<<<<<<< HEAD
return ( return (
<NavigationContainer> <NavigationContainer>
<Stack.Navigator> <Stack.Navigator>
@ -39,7 +28,6 @@ function Navigator(props) {
name="Splash" name="Splash"
component={Splash} component={Splash}
/> />
{!props.profile.token ? (
<> <>
<Stack.Screen <Stack.Screen
name="Login" name="Login"
@ -52,11 +40,9 @@ function Navigator(props) {
options={{headerShown: false}} options={{headerShown: false}}
/> />
</> </>
) : (
<> <>
<Stack.Screen name="Home" component={Home} /> <Stack.Screen name="Home" component={Home}/>
</> </>
)}
<Stack.Screen <Stack.Screen
name="Product" name="Product"
component={Product} component={Product}
@ -80,18 +66,6 @@ function Navigator(props) {
</Stack.Navigator> </Stack.Navigator>
</NavigationContainer> </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); 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 { View, StyleSheet, Dimensions } from "react-native";
import Identifier from "./Identifier"; import Identifier from "./Identifier";
function component2D({ list, flexDirection }) { function component2D({ list, flexDirection, navigation }) {
return ( return (
<View style={[styles.container, { flexDirection: flexDirection }]}> <View style={[styles.container, { flexDirection: flexDirection }]}>
{list.map((item, i) => ( {list.map((item, i) => (
<Identifier {...item} key={i} /> <Identifier navigation={navigation} {...item} key={i} />
))} ))}
</View> </View>
); );

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

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

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

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

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

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

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

Loading…
Cancel
Save