import React, { useEffect, useState } from "react"; import { View, Text, Image, StyleSheet, TouchableOpacity, ScrollView, } from "react-native"; import BackIcon from "../components/BackIcon"; import fontSize from "../utils/fontsizeUtils"; import CircleOutlineIcon from "../components/CircleOutlineIcon"; import { getCartList, GetCartList } from "../services/api/cart"; import widthUtils from "../utils/widthUtils"; export const CartScreen = () => { const [cartList, setCartList] = useState([]); const getCart = async () => { const res = await getCartList(); console.log(res); setCartList(res.items); }; useEffect(() => { getCart(); }, []); return ( {/* Replace SVG with actual icon component or image */} Panier (5) {cartList.map((item) => ( {item.subject} Commande min. : {item.quantity}pièces {/* Replace SVG with actual icon component or image */} {/* */} 3072 FCFA 3500FCFA -5% - 2 + ))} {/* 商品 */} {/* Divider */} {/* Coffee Cup Product */} {/* More product sections... */} {/* Fixed Bottom Section */} {/* Order Summary */} Quantité minimale de commande 50,000FCFA Tout 24928 FCFA Submit ); }; const styles = StyleSheet.create({ shoppingCartLayout: { flex: 1, backgroundColor: "white", }, scrollContainer: { flex: 1, }, scrollContentContainer: { paddingBottom: widthUtils(100,100).height, }, productListingContainer: { paddingTop: 3, paddingLeft: 16, paddingRight: 16, }, shoppingCartSection: { marginTop: 14, }, productCardContainer7: { flexDirection: "row", alignItems: "center", }, svgContainer: { width: widthUtils(18, 18).width, height: widthUtils(18, 18).height, }, shoppingCartTitle: { marginLeft: 8, fontSize: fontSize(24) , fontFamily: "Segoe UI", fontWeight: "600", color: "black", }, productCardListing: { width: "100%", paddingRight: 4, paddingLeft: 4, marginTop: 16, }, productCardContainer5: { flexDirection: "row", gap: 10, alignItems: "center", }, svgContainer1: { width: widthUtils(24, 24).width, height: widthUtils(24, 24).height, }, imageThumbnail: { width: widthUtils(50, 50).width, height: widthUtils(50, 50).height, borderRadius: 5, }, productInfoContainer2: { flex: 1, maxWidth: 288, }, casualTextSnippet: { width: "100%", fontSize: fontSize(16), lineHeight: fontSize(18), fontFamily: "Segoe UI", color: "black", textAlign: "left", }, productDetailsTextStyle1: { marginTop: 5, fontSize: fontSize(12), fontFamily: "Segoe UI", color: "#747474", }, productCardContainer6: { width: "100%", marginTop: 11, }, productCardContainer4: { marginTop: 12, marginBottom: 12, }, productImageDisplayStyle: { width: widthUtils(80, 80).width, height: widthUtils(80, 80).height, borderRadius: 5, }, productCardWidget1: { paddingBottom: 5, }, productVariantButton: { width: widthUtils(24, 80).width, height: widthUtils(24, 80).height, fontSize: fontSize(16), fontFamily: "Segoe UI", color: "#747474", backgroundColor: "#f4f4f4", borderRadius: 12, justifyContent: "center", alignItems: "center", }, productCardContainer3: { flexDirection: "row", alignItems: "center", marginTop: 18, }, productInfoContainer: { flexDirection: "row", alignItems: "center", }, productCodeLabel: { fontSize: fontSize(20), lineHeight: 22, fontFamily: "Segoe UI", fontWeight: "700", color: "#FF5100", }, productDetailsTextStyle: { fontSize: fontSize(11), fontFamily: "Segoe UI", fontWeight: "700", color: "#FF5100", lineHeight: fontSize(13), marginLeft: 3, }, productInfoContainer1: { flexDirection: "row", alignItems: "center", marginLeft: 3.75, }, priceInfoContainer1: { paddingTop: 10, paddingBottom: 5, }, discountPriceLabel: { fontSize: fontSize(12), fontFamily: "PingFang SC", fontWeight: "600", color: "#9a9a9a", }, borderBoxDivider: { width: "100%", marginTop: -4.75, borderTopWidth: 1, borderTopColor: "#9a9a9a", }, discountInfoContainer1: { flexDirection: "column", alignItems: "center", justifyContent: "center", marginLeft: 3.25, }, discountPercentageTextStyle: { fontSize: fontSize(11), fontFamily: "Segoe UI", fontWeight: "900", fontStyle: "italic", color: "#4e2000", }, svgContainer2: { width: widthUtils(32, 32).width, height: widthUtils(32, 32).height, marginTop: -26, }, orderQuantityContainer: { flexDirection: "row", alignItems: "center", marginLeft: 9, }, borderBoxDivider1: { width: widthUtils(9, 9).width, borderTopWidth: 1, borderTopColor: "black", }, svgContainer3: { width: widthUtils(12, 12).width, height: widthUtils(12, 12).height, }, quantityLabelContainer: { height: widthUtils(24, 24).height, paddingHorizontal: 15, marginLeft: 7, fontSize: fontSize(14), fontFamily: "Segoe UI", color: "black", backgroundColor: "#f4f4f4", borderRadius: 5, justifyContent: "center", alignItems: "center", }, svgContainer4: { marginLeft: 8, }, flexDivider: { height: widthUtils(8, 8).height, width: "120%", marginLeft: -20, }, productCardContainer2: { padding: 12, paddingLeft: 20, paddingRight: 20, paddingBottom: 16, }, coffeeCupImage: { width: widthUtils(50, 50).width, height: widthUtils(50, 50).height, borderRadius: 5, marginLeft: 7, }, coffeeCupDetailsContainer: { marginLeft: 14, }, coffeeCupDescriptionTextStyle: { fontSize: fontSize(16), lineHeight: fontSize(18), fontFamily: "Segoe UI", color: "black", textAlign: "left", }, productInfoTextStyle: { marginTop: 3, fontSize: fontSize(12), fontFamily: "Segoe UI", color: "#747474", }, productCardWidget: { flexDirection: "row", gap: 10, alignItems: "flex-start", marginTop: 8, }, svgContainer5: { width: widthUtils(24, 24).width, height: widthUtils(24, 24).height, alignSelf: "center", }, productCard: { paddingBottom: 7, }, productCardButton: { width: widthUtils(24,110).width, height: widthUtils(24,110).height, minWidth: widthUtils(24,110).width, fontSize: fontSize(16), fontFamily: "Segoe UI", color: "#747474", backgroundColor: "#f4f4f4", borderRadius: 12, justifyContent: "center", alignItems: "center", }, productCardDetails: { flexDirection: "row", alignItems: "flex-end", marginTop: 16, }, priceInfoContainer: { flexDirection: "row", alignItems: "flex-end", }, orangeHighlightedText: { fontSize: fontSize(20), lineHeight: fontSize(22), fontFamily: "Segoe UI", fontWeight: "700", color: "#FF5100", }, highlightedText: { fontSize: fontSize(11), fontFamily: "Segoe UI", fontWeight: "700", color: "#FF5100", marginLeft: -1, }, priceTag: { width: widthUtils(23,62).width, height: widthUtils(23,62).height, marginLeft: 4.75, }, discountInfoContainer: { flexDirection: "row", alignItems: "center", marginLeft: 3, }, centerContentSvg: { flexDirection: "column", alignItems: "center", justifyContent: "center", }, emphasizedPercentageText: { fontSize: fontSize(11), fontFamily: "Segoe UI", fontWeight: "900", fontStyle: "italic", color: "#4e2000", }, horizontalTextContainer: { flexDirection: "row", alignItems: "center", marginLeft: 14.5, }, numericBadge: { height: widthUtils(24, 24).height, paddingHorizontal: 15, marginLeft: 7.5, fontSize: fontSize(14), fontFamily: "Segoe UI", color: "black", backgroundColor: "#f4f4f4", borderRadius: 5, justifyContent: "center", alignItems: "center", }, productCardContainer: { padding: 17, paddingLeft: 20, paddingRight: 20, paddingBottom: 14, }, textInfoStyle: { marginTop: 2, fontSize: fontSize(12), fontFamily: "Segoe UI", color: "#747474", }, productCardContainer1: { height: widthUtils(80, 80).height, justifyContent: "center", }, productDescriptionStyle: { paddingRight: 13, paddingBottom: 4, paddingLeft: 13, fontSize: fontSize(13), lineHeight: 15, fontFamily: "Segoe UI", color: "#747474", textAlign: "left", backgroundColor: "#f4f4f4", borderRadius: 18, }, productPriceDiscountBadge: { flexDirection: "row", alignItems: "center", marginTop: 4, }, priceContainer: { flexDirection: "row", alignItems: "stretch", height: widthUtils(24, 24).height, }, verticalPriceContainer: { flexDirection: "column", alignItems: "stretch", justifyContent: "center", marginLeft: 3.75, }, priceLabel1: { fontSize: fontSize(12), fontFamily: "PingFang SC", fontWeight: "600", color: "#9a9a9a", alignSelf: "center", }, priceDivider: { marginTop: -4.75, borderTopWidth: 1, borderTopColor: "#9a9a9a", }, discountInfoContainer2: { flexDirection: "row", alignItems: "center", marginLeft: 3.25, }, orderSummaryHeader: { flexDirection: "row", alignItems: "center", height: widthUtils(33, 33).height, paddingRight: 20, paddingLeft: 20, backgroundColor: "linear-gradient(90deg, rgba(255, 231, 213, 1) 0%, rgba(255, 218, 218, 1) 98.56%)", borderRadius: 10, borderBottomLeftRadius: 0, borderBottomRightRadius: 0, }, svgContainer6: { width: widthUtils(18, 18).width, height: widthUtils(18, 18).height, }, orderQuantityInfo: { marginLeft: 7, fontSize: fontSize(14), fontFamily: "Segoe UI", color: "black", }, tiltWarpText: { fontSize: fontSize(14), fontFamily: "Tilt Warp", }, flexboxContainerWithButton: { flexDirection: "row", gap: 8, alignItems: "center", justifyContent: "space-between", height: widthUtils(70, 70).height, paddingRight: 20, paddingLeft: 20, }, headerTitle: { marginLeft: 7, fontSize: fontSize(14), fontFamily: "Segoe UI", fontWeight: "600", color: "black", }, highlightedText1: { fontSize: fontSize(24), lineHeight: fontSize(22), fontFamily: "Segoe UI", fontWeight: "700", color: "black", }, priceLabel: { fontSize: fontSize(11), fontFamily: "Segoe UI", fontWeight: "700", color: "black", lineHeight: fontSize(13), marginTop:fontSize(-8) }, submitButtonStyle: { width: widthUtils(50,160).width, height: widthUtils(50,160).height, minWidth: widthUtils(50,160).width, marginLeft: 11.5, fontSize: fontSize(18), lineHeight: fontSize(22), fontFamily: "Segoe UI", fontWeight: "700", color: "white", backgroundColor: "#FF5100", borderRadius: 30, justifyContent: "center", alignItems: "center", }, fixedBottomContainer: { position: "absolute", bottom: 0, left: 0, right: 0, backgroundColor: "white", }, });