import { View, Text, Platform, TouchableOpacity, Dimensions, } from "react-native"; import React from "react"; import { connect } from "react-redux"; import Svg, { Path, G } from "react-native-svg"; import { useNavigation } from "@react-navigation/native"; //components //style import tw from "tailwind-rn"; import fontSize from "../../../constants/fontSize"; import Colors from "../../../constants/Colors"; const ios = Platform.OS === "ios"; const List = ({ mobile, theme }) => { const navigation = useNavigation(); const pages = [ { icon: ( ), name: "اطلاعات حساب کاربری", onPress: () => navigation.push("CreateAddress", { type: "profile" }), }, { icon: ( ), name: "سفارشات", onPress: () => navigation.push("Orders"), }, { icon: ( ), name: "کتاب‌های من", onPress: () => navigation.push("AR"), }, { icon: ( ), name: "دوره‌های من", onPress: () => {}, }, { icon: ( ), name: "لیست علاقه‌مندی‌ها", onPress: () => navigation.push("ProfileBookmark"), }, { icon: ( ), name: "آدرس‌ها", onPress: () => navigation.push("ProfileAddress"), }, ]; return ( {pages.map((page, index) => ( page.onPress()} > {page.icon} {page.name} ))} ); }; const mapStateToProps = (state) => ({ mobile: state.publicApi.mobile, theme: state.publicApi.theme }); export default connect(mapStateToProps)(List);