|
|
import React, { useState, useEffect } from "react"; |
|
|
import { |
|
|
View, |
|
|
Dimensions, |
|
|
ScrollView, |
|
|
SafeAreaView, |
|
|
Platform, |
|
|
StatusBar, |
|
|
Linking, |
|
|
} from "react-native"; |
|
|
import { connect } from "react-redux"; |
|
|
import { faq } from "../../redux/actions"; |
|
|
import { useNavigation } from "@react-navigation/native"; |
|
|
|
|
|
//style |
|
|
import tw from "tailwind-rn"; |
|
|
import Colors from "../../constants/Colors"; |
|
|
|
|
|
//components |
|
|
import Header from "../../components/Header"; |
|
|
import Navbar from "../../components/Navbar"; |
|
|
import Box from "./layouts/Box"; |
|
|
|
|
|
//assets |
|
|
import onlineSupportIcon from "./assets/online-support.png"; |
|
|
import callIcon from "./assets/call.png"; |
|
|
import addressIcon from "./assets/address.png"; |
|
|
import bgContact from "./assets/contact.png"; |
|
|
|
|
|
const { width, height } = Dimensions.get("window"); |
|
|
|
|
|
function Contact({ theme }) { |
|
|
const navigation = useNavigation(); |
|
|
|
|
|
React.useEffect(() => { |
|
|
StatusBar.setBarStyle( |
|
|
`${theme === "light" ? "dark" : "light"}-content`, |
|
|
true |
|
|
); |
|
|
}, [theme]); |
|
|
|
|
|
const info = React.useMemo(() => { |
|
|
return { |
|
|
onlineSupport: { |
|
|
icon: onlineSupportIcon, |
|
|
title: { text: "پشتیبانی آنلاین", color: "#D3B702" }, |
|
|
description: { |
|
|
text: "همکاران ما در قسمت فروش و پشتیبانی، پاسخگوی شما هستند هر سوالی در مورد کتابهای ما داشتید بپرسید", |
|
|
color: theme === "light" ? "#766600" : "#D3B702", |
|
|
}, |
|
|
link: { |
|
|
title: "ارتباط با بخش پشتیبانی", |
|
|
link: "/support", |
|
|
color: theme === "light" ? "#766600" : "#D3B702", |
|
|
}, |
|
|
bg: "#D3B70233", |
|
|
borderColor: "#D3B70255", |
|
|
onPress: () => navigation.push("Tickets"), |
|
|
}, |
|
|
call: { |
|
|
icon: callIcon, |
|
|
title: { text: "شماره تماس", color: "#06A02A" }, |
|
|
description: { |
|
|
text: "در صورت هرگونه سوال شما میتوانید در ساعات اداری 9 الی 17 با شماره 021۸۸۸۱۴۶۳۷ تماس حاصل فرمایید", |
|
|
color: theme === "light" ? "#025816" : "#06A02A", |
|
|
}, |
|
|
link: null, |
|
|
bg: "#69FF5F33", |
|
|
borderColor: "#69FF5F55", |
|
|
onPress: () => Linking.openURL(`tel:02188814637`), |
|
|
}, |
|
|
address: { |
|
|
icon: addressIcon, |
|
|
title: { text: "نشانی", color: "#0EAD98" }, |
|
|
description: { |
|
|
text: "نشانی دفتر مرکزی: تهران میدان فردوسی خیابان عباس موسوی پلاک 30", |
|
|
color: theme === "light" ? "#066A5C" : "#0EAD98", |
|
|
}, |
|
|
link: { |
|
|
title: "لیست نمایندگیهای فروش", |
|
|
link: "/sell", |
|
|
color: theme === "light" ? "#0A7769" : "#0EAD98", |
|
|
}, |
|
|
bg: "#0A776933", |
|
|
borderColor: "#0A776955", |
|
|
onPress: () => {}, |
|
|
}, |
|
|
}; |
|
|
}, [theme]); |
|
|
return ( |
|
|
<SafeAreaView |
|
|
style={{ |
|
|
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0, |
|
|
position: "relative", |
|
|
}} |
|
|
> |
|
|
<Navbar |
|
|
headerOptions={{ |
|
|
logo: false, |
|
|
menu: false, |
|
|
hamburgerMenu: false, |
|
|
title: "", |
|
|
bookmark: false, |
|
|
qr: false, |
|
|
back: true, |
|
|
backgroundColor: Colors.theme1.greenCF + "0F", |
|
|
}} |
|
|
/> |
|
|
|
|
|
<ScrollView style={[tw("flex pb-20 px-4 mb-4")]}> |
|
|
<Header |
|
|
background={bgContact} |
|
|
title={"ارتباط با ما"} |
|
|
description={"تیم پشتیبانی ما اینجاست تا شما رو کمک کنه"} |
|
|
/> |
|
|
{Object.keys(info).map((item, index) => ( |
|
|
<Box info={info[item]} key={index} /> |
|
|
))} |
|
|
</ScrollView> |
|
|
</SafeAreaView> |
|
|
); |
|
|
} |
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
theme: state.publicApi.theme, |
|
|
}); |
|
|
|
|
|
const mapDispatchToProps = {}; |
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Contact);
|
|
|
|