diff --git a/navigation/index.js b/navigation/index.js
index db95d53..a4ad647 100644
--- a/navigation/index.js
+++ b/navigation/index.js
@@ -40,6 +40,8 @@ import Sample from "../src/screens/Product/components/Sample";
import Info from "../src/screens/Product/components/Info";
import Rules from "../src/screens/Rules/index";
import MyCourses from "../src/screens/Profile/components/MyCourses";
+import Ticket from "../src/screens/Contact/layouts/Ticket";
+import Tickets from "../src/screens/Contact/layouts/Tickets";
//style
import Colors from "../src/constants/Colors";
@@ -488,6 +490,8 @@ const Navigation = ({ getStatus, isLogin, userProducts, ltr, setLTR }) => {
+
+
);
diff --git a/package.json b/package.json
index 3c4229b..539d885 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
"react-i18next": "^11.15.1",
"react-native": "0.64.3",
"react-native-awesome-alerts": "^1.5.2",
+ "react-native-html-parser": "^0.1.0",
"react-native-openanything": "^0.0.6",
"react-native-qrcode-scanner": "^1.5.4",
"react-native-ratings": "^8.1.0",
diff --git a/src/components/MapSelector.js b/src/components/MapSelector.js
index 1354a09..0c93c88 100644
--- a/src/components/MapSelector.js
+++ b/src/components/MapSelector.js
@@ -1,30 +1,40 @@
-import React, {Component} from 'react';
-import { SafeAreaView, StyleSheet, View} from 'react-native';
-// import Mapir from 'mapir-react-native-sdk'
+import React, { Component } from "react";
+import { SafeAreaView, StyleSheet, View } from "react-native";
+// import Mapir from "mapir-react-native-sdk";
-const X_API_KEY = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjkyODE4ODI0N2FhMjdlYTMyMzVlYzRiOWUxZDI3NTQyZTNjYmI3ZjQzY2Q2NGQzYjdkYjU1NmY3NDM5YzU2NzUyNzMxMjAzYzMwOTliYTFiIn0.eyJhdWQiOiIxNjk2MSIsImp0aSI6IjkyODE4ODI0N2FhMjdlYTMyMzVlYzRiOWUxZDI3NTQyZTNjYmI3ZjQzY2Q2NGQzYjdkYjU1NmY3NDM5YzU2NzUyNzMxMjAzYzMwOTliYTFiIiwi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R38_isrnfTXKfW9PPixyLaN3404tcjOU1r02HIurrplXlIKRKG9CVXxKsESfJJ8trwtZw6O4erxrnisxfL0VwAR7l69P6KcFb57vvM4j4hKFqxUDr4YvSq1qOTt3urYbAKehhvoiLhZxw";
export default function MapSelector() {
- onRegionDidChange = (e) => {
- };
+ onRegionDidChange = (e) => {};
return (
-
- {/* onRegionDidChange(e)}
- style={styles.container}
- /> */}
- {/*
- */}
-
+
+ {/* onRegionDidChange(e)}
+ style={{
+ flex: 1,
+ }}
+ styleURL={Mapir?.StyleURL?.Street}
+ >
+
+ */}
+
);
}
const styles = StyleSheet.create({
container: {
- width : '100%', height: 300
+ width: "100%",
+ height: 300,
},
-});
\ No newline at end of file
+});
diff --git a/src/components/Navbar.js b/src/components/Navbar.js
index fb15297..3c3f0ce 100644
--- a/src/components/Navbar.js
+++ b/src/components/Navbar.js
@@ -93,8 +93,8 @@ const Navbar = ({
{headerOptions?.title ? (
{
- const profilePage = route.params?.type === "profile";
- const colorScheme = Appearance.getColorScheme();
- const navigation = useNavigation();
const [addressFields, setAddressFields] = useState({});
const [mapAddress, setMapAddress] = useState(null);
+ const colorScheme = Appearance.getColorScheme();
+ const navigation = useNavigation();
+
+ const profilePage = React.useMemo(() => {
+ return route.params?.type === "profile";
+ });
useEffect(() => {
getProvince();
@@ -270,6 +273,7 @@ const Address = ({
title="اطلاعات هویتی"
text="( لطفا نام و نام خانوادگی خود را به طور کامل وارد نمایید )"
/>
+ {!profilePage && }
{
- {/*
+
{
>
{blog?.title}
-
-
- */}
+ {console.log(
+ new DomParser()?.parseFromString(blog?.text, "text/html")
+ ?.childNodes
+ )}
+
{blogs.length && (
{
style={[tw("flex flex-row mt-3 pb-3")]}
data={blogs}
renderItem={({ item }) => }
- keyExtractor={(item, index) => { return item.id }}
+ keyExtractor={(item, index) => {
+ return item.id;
+ }}
/>
)}
@@ -193,7 +182,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
const mapStateToProps = (state) => ({
blog: state.blog.blog,
blogs: state.blog.list,
- theme: state.publicApi.theme
+ theme: state.publicApi.theme,
});
const mapDispatchToProps = {
@@ -202,6 +191,11 @@ const mapDispatchToProps = {
setHeaderOptions: publicApi.setHeaderOptions,
};
+const Tag = ({ tag }) => {
+ console.log(tag);
+ return;
+};
+
export default connect(mapStateToProps, mapDispatchToProps)(Blog);
const styles = StyleSheet.create({
@@ -213,4 +207,4 @@ const styles = StyleSheet.create({
paddingVertical: 0,
paddingHorizontal: 0,
},
-});
+});
\ No newline at end of file
diff --git a/src/screens/Contact/Box.js b/src/screens/Contact/Box.js
deleted file mode 100644
index 156e2b0..0000000
--- a/src/screens/Contact/Box.js
+++ /dev/null
@@ -1,108 +0,0 @@
-import { View, Text, Image, TouchableOpacity, Platform, Dimensions } from "react-native";
-import RBSheet from "react-native-raw-bottom-sheet";
-import React from "react";
-import { connect } from "react-redux";
-
-//components
-import Ticket from '../../components/BottomSheetComponents/Ticket';
-
-//style
-import tw from "tailwind-rn";
-import fontSize from "../../constants/fontSize";
-
-const ios = Platform.OS === "ios";
-const {height, width} = Dimensions.get("window");
-
-const Box = ({ info, mobile }) => {
- const refRBSheet = React.useRef();
-
- return (
- <>
- refRBSheet.current.open()}
- >
-
-
-
- {info.title.text}
-
-
- {info.description.text}
-
-
- {info?.link?.title}
-
-
-
-
-
-
- >
- );
-};
-
-const mapStateToProps = (state) => ({
- mobile: state.publicApi.mobile,
-});
-
-export default connect(mapStateToProps)(Box);
diff --git a/src/screens/Contact/index.js b/src/screens/Contact/index.js
index 7753c4f..7e394dc 100644
--- a/src/screens/Contact/index.js
+++ b/src/screens/Contact/index.js
@@ -17,7 +17,7 @@ import Colors from "../../constants/Colors";
//components
import Header from "../../components/Header";
import Navbar from "../../components/Navbar";
-import Box from "./Box";
+import Box from "./layouts/Box";
//assets
import onlineSupportIcon from "./assets/online-support.png";
diff --git a/src/screens/Contact/layouts/Box.js b/src/screens/Contact/layouts/Box.js
new file mode 100644
index 0000000..948c201
--- /dev/null
+++ b/src/screens/Contact/layouts/Box.js
@@ -0,0 +1,89 @@
+import {
+ View,
+ Text,
+ Image,
+ TouchableOpacity,
+ Platform,
+ Dimensions,
+} from "react-native";
+import React from "react";
+import { connect } from "react-redux";
+import { useNavigation } from "@react-navigation/native";
+
+//style
+import tw from "tailwind-rn";
+import fontSize from "../../../constants/fontSize";
+
+const ios = Platform.OS === "ios";
+const { height, width } = Dimensions.get("window");
+
+const Box = ({ info, mobile }) => {
+ const navigation = useNavigation();
+ const refRBSheet = React.useRef();
+
+ return (
+ navigation.push("Tickets")}
+ >
+
+
+
+ {info.title.text}
+
+
+ {info.description.text}
+
+
+ {info?.link?.title}
+
+
+
+ );
+};
+
+const mapStateToProps = (state) => ({
+ mobile: state.publicApi.mobile,
+});
+
+export default connect(mapStateToProps)(Box);
diff --git a/src/components/BottomSheetComponents/Ticket.js b/src/screens/Contact/layouts/Ticket.js
similarity index 70%
rename from src/components/BottomSheetComponents/Ticket.js
rename to src/screens/Contact/layouts/Ticket.js
index 9d89153..8b6c3d1 100644
--- a/src/components/BottomSheetComponents/Ticket.js
+++ b/src/screens/Contact/layouts/Ticket.js
@@ -1,18 +1,26 @@
import React, { useMemo, useEffect, useCallback } from "react";
-import { ScrollView, Appearance, View } from "react-native";
+import {
+ ScrollView,
+ Appearance,
+ SafeAreaView,
+ View,
+ StatusBar,
+ Platform,
+} from "react-native";
import { connect } from "react-redux";
-import { userProduct, comment, file, form } from "../../redux/actions";
-import onInput from "../../utils/onInput";
+import { userProduct, comment, file, form } from "../../../redux/actions";
+import onInput from "../../../utils/onInput";
//components
-import CustomTextInput from "../CustomTextInput";
-import CustomPressable from "../Pressable";
-import Select from "../Select";
+import CustomTextInput from "../../../components/CustomTextInput";
+import CustomPressable from "../../../components/Pressable";
+import Select from "../../../components/Select";
+import Navbar from "../../../components/Navbar";
//style
import tw from "tailwind-rn";
-import Colors from "../../constants/Colors";
-import fontSize from "../../constants/fontSize";
+import Colors from "../../../constants/Colors";
+import fontSize from "../../../constants/fontSize";
export const Ticket = ({
myProductList,
@@ -23,12 +31,11 @@ export const Ticket = ({
upload,
setTicket,
grades,
- theme
+ theme,
}) => {
- let opt = useMemo(
- () => ["واحد مورد نظر", "واحد فروش", "واحد فنی", "واحد محتوایی"],
- [status]
- );
+ let opt = useMemo(() => {
+ return ["واحد مورد نظر", "واحد فروش", "واحد فنی", "واحد محتوایی"];
+ }, [status]);
useEffect(() => {
if (myProductList.length === 0 && status) {
@@ -67,8 +74,26 @@ export const Ticket = ({
}, [status]);
return (
-
-
+
+
+
{!status && (
<>
>
)}
-
- send()}
- />
-
+
+ send()}
+ />
+
+
);
};
@@ -148,7 +175,7 @@ const mapStateToProps = (state) => ({
status: state.user.status,
ticket: state.form.ticket,
grades: state.publicApi.grades,
- theme: state.publicApi.theme
+ theme: state.publicApi.theme,
});
const mapDispatchToProps = {
diff --git a/src/screens/Contact/layouts/Tickets.js b/src/screens/Contact/layouts/Tickets.js
new file mode 100644
index 0000000..7d34695
--- /dev/null
+++ b/src/screens/Contact/layouts/Tickets.js
@@ -0,0 +1,76 @@
+import React, { useMemo, useEffect, useCallback } from "react";
+import {
+ SafeAreaView,
+ View,
+ StatusBar,
+ Platform,
+ FlatList,
+} from "react-native";
+import { connect } from "react-redux";
+import { userProduct, comment, file, form } from "../../../redux/actions";
+import { useNavigation } from "@react-navigation/native";
+//components
+import CustomPressable from "../../../components/Pressable";
+import Navbar from "../../../components/Navbar";
+import Empty from "../../../components/Empty";
+
+//style
+import tw from "tailwind-rn";
+import Colors from "../../../constants/Colors";
+import fontSize from "../../../constants/fontSize";
+
+export const Tickets = ({ tickets = [], theme }) => {
+ const navigation = useNavigation();
+ return (
+
+
+ {tickets.length ? (
+ }
+ keyExtractor={(item, index) => {
+ return index;
+ }}
+ />
+ ) : (
+
+ )}
+
+ navigation.push("Ticket")}
+ />
+
+
+ );
+};
+
+const mapStateToProps = (state) => ({
+ theme: state.publicApi.theme,
+});
+
+const mapDispatchToProps = {};
+
+export default connect(mapStateToProps, mapDispatchToProps)(Tickets);
diff --git a/src/screens/QR/layouts/Scan/index.js b/src/screens/QR/layouts/Scan/index.js
index 3bf7936..cd4def4 100644
--- a/src/screens/QR/layouts/Scan/index.js
+++ b/src/screens/QR/layouts/Scan/index.js
@@ -12,6 +12,7 @@ import { BarCodeScanner } from "expo-barcode-scanner";
import { Entypo } from "@expo/vector-icons";
import { connect } from "react-redux";
+//style
import tw from "tailwind-rn";
import Colors from "../../../../constants/Colors";
diff --git a/src/screens/ShoppingCart/index.js b/src/screens/ShoppingCart/index.js
index 04b2a2f..17fd3e7 100644
--- a/src/screens/ShoppingCart/index.js
+++ b/src/screens/ShoppingCart/index.js
@@ -267,7 +267,7 @@ function ShoppingCart({
showCancelButton: false,
})
: hasPhysical
- ? navigation.push("DeliveryForm")
+ ? navigation.navigate("DeliveryForm")
: payFactor({ userId })
}
/>
diff --git a/yarn.lock b/yarn.lock
index c1eba18..cdef323 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5502,6 +5502,11 @@ react-native-codegen@^0.0.6:
jscodeshift "^0.11.0"
nullthrows "^1.1.1"
+react-native-html-parser@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/react-native-html-parser/-/react-native-html-parser-0.1.0.tgz#c35de1dc325562da26e68befa423bac34505ba48"
+ integrity sha512-G5d0pk7TA9YgjVJhLRf2zMOOf1HXd8ItM9JYsTS2pXoEfSRfMfRU5iTj03LGwvHU2NT9kc18NDJeLgZY6+Bbvg==
+
react-native-iphone-x-helper@^1.3.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010"