reza added something

master
Reza_ashrafi 2 years ago
parent 7412be7d44
commit 5ff1acee71
  1. 1
      navigation/index.js
  2. 1
      package.json
  3. 10
      src/components/Drawer.js
  4. 2
      src/screens/OrderDetails/components/Book.js
  5. 1
      src/screens/OrderDetails/index.js
  6. 1
      src/screens/OrdersFollowUp/components/Order.js
  7. 4
      src/screens/Otp/index.js
  8. 1
      src/screens/Products/components/Header.js
  9. 11
      src/screens/Profile/components/User.js
  10. 3
      src/screens/Splash/index.js

@ -443,6 +443,7 @@ const Navigation = ({ getStatus, isLogin, userProducts, ltr, setLTR }) => {
} }
getStatus(); getStatus();
}, []); }, []);
return ( return (
<NavigationContainer linking={linking}> <NavigationContainer linking={linking}>
<Stack.Navigator <Stack.Navigator

@ -34,7 +34,6 @@
"i18next": "^21.6.3", "i18next": "^21.6.3",
"install": "^0.13.0", "install": "^0.13.0",
"jalali-moment": "^3.3.11", "jalali-moment": "^3.3.11",
"lodash": "^4.17.21",
"mapir-react-native-sdk": "^2.2.4", "mapir-react-native-sdk": "^2.2.4",
"react": "17.0.1", "react": "17.0.1",
"react-dom": "17.0.1", "react-dom": "17.0.1",

@ -11,6 +11,7 @@ import {
LayoutAnimation, LayoutAnimation,
} from "react-native"; } from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import {asyncAwesomeAlert} from "../utils/AsyncWrappers";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { user } from "../redux/actions"; import { user } from "../redux/actions";
import Svg, { Path, G } from "react-native-svg"; import Svg, { Path, G } from "react-native-svg";
@ -344,7 +345,7 @@ const Drawer = ({ position, setBoxPosition, user, mobile, theme }) => {
</View> </View>
</View> </View>
<View style={tw("flex-1 flex")}> <View style={tw("flex-1 flex")}>
<View <Pressable
style={[ style={[
tw( tw(
`flex flex-row justify-between items-center w-full flex-row-reverse px-4 overflow-hidden` `flex flex-row justify-between items-center w-full flex-row-reverse px-4 overflow-hidden`
@ -355,6 +356,11 @@ const Drawer = ({ position, setBoxPosition, user, mobile, theme }) => {
height: dropdownHeight, height: dropdownHeight,
}, },
]} ]}
onPress={() =>
asyncAwesomeAlert("نتیجه", "این قابلیت در حال توسعه است.", {
showCancelButton: false,
})
}
> >
<Text <Text
style={{ style={{
@ -376,7 +382,7 @@ const Drawer = ({ position, setBoxPosition, user, mobile, theme }) => {
> >
+ +
</Text> </Text>
</View> </Pressable>
<View style={tw("flex w-full px-4")}> <View style={tw("flex w-full px-4")}>
{routes.map((route, index) => ( {routes.map((route, index) => (
<Route route={route} key={index} /> <Route route={route} key={index} />

@ -6,8 +6,6 @@ import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize"; import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors"; import Colors from "../../../constants/Colors";
import _ from "lodash";
const width = Dimensions.get("window").width; const width = Dimensions.get("window").width;
function Book({ book, mobile, grades, theme }) { function Book({ book, mobile, grades, theme }) {

@ -11,7 +11,6 @@ import {
LayoutAnimation, LayoutAnimation,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import _ from "lodash";
import moment from "jalali-moment"; import moment from "jalali-moment";
//components //components

@ -10,7 +10,6 @@ import {
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Svg, { Path } from "react-native-svg"; import Svg, { Path } from "react-native-svg";
import _ from "lodash";
import moment from "jalali-moment"; import moment from "jalali-moment";
//style //style

@ -152,7 +152,7 @@ function Otp(props) {
useEffect(() => { useEffect(() => {
if (props.isLogin) { if (props.isLogin) {
props.navigation.navigate("Root"); // props.navigation.navigate("Root");
} }
}, [props.isLogin]); }, [props.isLogin]);
@ -215,7 +215,7 @@ function Otp(props) {
fontFamily: "demi", fontFamily: "demi",
}} }}
> >
{' ' + props.route.params?.phone || "09123456789" + ' '} {' ' + (props.route.params?.phone || "") + ' '}
</Text>{" "} </Text>{" "}
ارسال شد. آن را در قسمت زیر وارد کنید. ارسال شد. آن را در قسمت زیر وارد کنید.
</Text> </Text>

@ -1,6 +1,5 @@
import { View, Text } from "react-native"; import { View, Text } from "react-native";
import React from "react"; import React from "react";
import _ from "lodash";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { book } from "../../../redux/actions"; import { book } from "../../../redux/actions";

@ -1,9 +1,10 @@
import { View, Text, Image, Platform, Pressable } from "react-native"; import { View, Text, Image, Platform, Pressable, BackHandler } from "react-native";
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import {user} from "../../../redux/actions"; import {user} from "../../../redux/actions";
import Svg, { Path } from "react-native-svg"; import Svg, { Path } from "react-native-svg";
import { asyncAwesomeAlert } from "../../../utils/AsyncWrappers"; import { asyncAwesomeAlert } from "../../../utils/AsyncWrappers";
import { useNavigation } from "@react-navigation/native";
//style //style
import tw from "tailwind-rn"; import tw from "tailwind-rn";
@ -14,6 +15,14 @@ const ios = Platform.OS === "ios";
const User = ({ user, mobile, theme, logout }) => { const User = ({ user, mobile, theme, logout }) => {
const [dropdown, setDropdown] = React.useState(true); const [dropdown, setDropdown] = React.useState(true);
const navigation = useNavigation();
React.useEffect(() => {
if(!user){
navigation.navigate('Login');
}
},[user]);
return ( return (
<View style={tw(`w-full ${ios ? "items-end" : ""}`)}> <View style={tw(`w-full ${ios ? "items-end" : ""}`)}>
<Pressable <Pressable

@ -41,7 +41,8 @@ function Splash({
}, [isLogin, userProducts, books, blogs]); }, [isLogin, userProducts, books, blogs]);
if(isFocused && out){ if(isFocused && out){
setOut(false); console.log('from back button');
// setOut(false);
BackHandler.exitApp(); BackHandler.exitApp();
} }

Loading…
Cancel
Save