import { View, Text, Pressable, Appearance, SafeAreaView, ScrollView, StyleSheet, Platform, Dimensions, StatusBar, Image, mobile, } from "react-native"; import React from "react"; import { connect } from "react-redux"; import { useNavigation } from "@react-navigation/native"; import Svg, { Path } from "react-native-svg"; import { userFavorite } from "../../../../redux/actions"; //components 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"; //assets import bookImage from "../../..//OrdersFollowUp/assets/b1.png"; const { height, width } = Dimensions.get("window"); const ios = Platform.OS === "ios"; const ProfileBookmark = ({ bookmarkList, getList }) => { React.useEffect(() => { getList(); }, []); return ( {bookmarkList?.length > 0 ? ( {bookmarkList?.map((bookmark, index) => ( ))} ) : ( )} ); }; const Bookmark = ({ bookmark }) => { const colorScheme = Appearance.getColorScheme(); return ( {bookmark.name} {bookmark.grade} ); }; const mapStateToProps = (state) => ({ loading: state.userFactor.loading, mobile: state.publicApi.mobile, bookmarkList: state.userFavorite.list, }); const mapDispatchToProps = { getList: userFavorite.list, }; export default connect(mapStateToProps, mapDispatchToProps)(ProfileBookmark); const styles = StyleSheet.create({ contentContainerStyle: { paddingBottom: 100, position: "relative", }, container: { backgroundColor: "white", flexDirection: "column", paddingVertical: 0, paddingHorizontal: 0, }, }); // ProfileBookmark.defaultProps = { // bookmarkList: [ // { // name: "کتاب آموزشی علوم تجربی", // grade: "پایه ششم ابتدایی", // image: bookImage, // }, // ], // };