import { faArrowLeft } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-native-fontawesome";
import { useNavigation } from "@react-navigation/native";
import React from "react";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { createMaterialTopTabNavigator } from "@react-navigation/material-top-tabs";
import CompletedCard from "../../components/profile/my_purchases/CompletedCard";
import MasonryList from "@react-native-seoul/masonry-list";
import { checkOut } from "../../constants/checkout";
import ToPayCard from "../../components/profile/my_purchases/ToPay";
import ToShipCard from "../../components/profile/my_purchases/ToShip";
import ToReceiveCard from "../../components/profile/my_purchases/ToReceive";
const Tab = createMaterialTopTabNavigator();
function ToPay() {
return (
item.status === "to pay")}
keyExtractor={(item) => item.id}
style={styles.list}
numColumns={1}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => }
containerStyle={styles.container1}
contentContainerStyle={styles.content}
onEndReachedThreshold={0.1}
/>
);
}
function ToShip() {
return (
item.status === "to ship")}
keyExtractor={(item) => item.id}
style={styles.list}
numColumns={1}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => }
containerStyle={styles.container1}
contentContainerStyle={styles.content}
onEndReachedThreshold={0.1}
/>
);
}
function ToReceive() {
return (
item.status === "to receive")}
keyExtractor={(item) => item.id}
style={styles.list}
numColumns={1}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => }
containerStyle={styles.container1}
contentContainerStyle={styles.content}
onEndReachedThreshold={0.1}
/>
);
}
function Completed() {
return (
item.status === "completed")}
keyExtractor={(item) => item.id}
style={styles.list}
numColumns={1}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => }
containerStyle={styles.container1}
contentContainerStyle={styles.content}
onEndReachedThreshold={0.1}
/>
);
}
const MyPurchases = () => {
const navigation = useNavigation();
return (
navigation.navigate("Home")}
style={styles.backIcon}
>
My Purchases
);
};
const styles = StyleSheet.create({
container: {
backgroundColor: "#ffff",
width: "100%",
height: "100%",
},
wrapper: {
height: "95%",
width: "100%",
justifyContent: "center",
// alignItems:'center'
marginBottom: 20,
},
header: {
alignItems: "center",
width: "100%",
top: 0,
paddingLeft: 15,
flexDirection: "row",
borderColor: "#ddd",
paddingBottom: 15,
borderBottomWidth: 1,
},
headerText: {
fontSize: 16,
fontWeight: "600",
marginLeft: 25,
},
tabCon: {
width: "100%",
height: "100%",
},
list: {
width: "100%",
justifyContent: "center",
alignItems: "center",
padding: 5,
},
});
export default MyPurchases;