You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1785 lines
56 KiB

import React, { useEffect, useCallback, useState } from "react";
import {
View,
Text,
Image,
2 months ago
StyleSheet,
TouchableOpacity,
2 months ago
ScrollView,
Dimensions,
2 months ago
useWindowDimensions,
2 months ago
Animated,
BackHandler,
1 month ago
ActivityIndicator,
Alert,
InteractionManager,
Platform,
3 weeks ago
StatusBar,
SafeAreaView,
Modal
2 months ago
} from "react-native";
2 months ago
import fontSize from "../utils/fontsizeUtils";
import widthUtils from "../utils/widthUtils";
import DiagonalArrowIcon from "../components/DiagonalArrowIcon";
import Carousel from "react-native-reanimated-carousel";
import WhiteCircleIcon from "../components/WhiteCircleIconIcon";
import ShoppingCartIcon from "../components/ShoppingCartIcon";
import HeartIcon from "../components/HeartIcon";
import HeartRedIcon from "../components/HeartIconRed";
import ShareIcon from "../components/ShareIcon";
3 weeks ago
import { Image as ExpoImage, ImageBackground } from "expo-image";
import useUserStore from "../store/user";
import { getSubjectTransLanguage } from "../utils/languageUtils";
import { useTranslation } from "react-i18next";
3 weeks ago
import { getBurialPointData } from "../store/burialPoint";
import useBurialPointStore from "../store/burialPoint";
import * as ImagePicker from "expo-image-picker";
import * as FileSystem from "expo-file-system";
2 months ago
import {
productApi,
ProductDetailParams,
Similars,
2 months ago
SkuAttribute,
ProductGroupList,
similar,
2 months ago
} from "../services/api/productApi";
2 months ago
import { useNavigation, useRoute } from "@react-navigation/native";
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { RouteProp } from "@react-navigation/native";
2 months ago
import BackIcon from "../components/BackIcon";
import CameraIcon from "../components/CameraIcon";
2 months ago
import ProductCard from "./ProductCard";
import useProductCartStore from "../store/productCart";
type ProductDetailRouteParams = {
offer_id: string;
searchKeyword?: string;
2 months ago
price: number;
};
export const ProductDetailScreen = () => {
3 weeks ago
const { t } = useTranslation();
3 weeks ago
const { logViewProduct } = useBurialPointStore();
3 weeks ago
const { product, setProduct, groupList, setGroupList } =
useProductCartStore();
4 weeks ago
const userStore = useUserStore();
2 months ago
const { width } = useWindowDimensions(); // 移动到组件内部
const navigation = useNavigation<NativeStackNavigationProp<any>>();
2 months ago
const route =
useRoute<RouteProp<Record<string, ProductDetailRouteParams>, string>>();
2 months ago
const [activeIndex, setActiveIndex] = useState(0);
const screenWidth = Dimensions.get("window").width;
const [expandedGroups, setExpandedGroups] = useState<{
[key: string]: boolean;
}>({});
const [isHeartRed, setIsHeartRed] = useState(false);
1 month ago
const [isLoading, setIsLoading] = useState(true);
2 months ago
const [similars, setSimilars] = useState<Similars>();
const [isSimilarsFlag, setIsSimilarsFlag] = useState(false);
2 months ago
const [imageUrls, setImageUrls] = useState<any[]>([]);
const [imageHeights, setImageHeights] = useState<{ [key: string]: number }>(
{}
);
2 months ago
const [priceSelectedSku, setPriceSelectedSku] = useState<any>();
const [showBottomSheet, setShowBottomSheet] = useState(false);
const [showImagePickerModal, setShowImagePickerModal] = useState(false);
const [galleryUsed, setGalleryUsed] = useState(false);
const groupData = (
res: ProductDetailParams,
priceSelectedSku: SkuAttribute[]
) => {
2 months ago
let result = {} as any;
// 遍历数据
res.skus.forEach((item) => {
item.attributes.forEach((attribute) => {
const { attribute_name, value } = attribute;
// 如果结果对象中没有对应的属性名,则创建一个空数组
if (!result[attribute_name]) {
result[attribute_name] = [];
}
// 如果当前属性的值(value)已经存在于该组内,跳过
if (
!result[attribute_name].some(
(existingAttribute: any) => existingAttribute.value === value
)
) {
result[attribute_name].push(attribute);
}
2 months ago
});
2 months ago
});
const list: ProductGroupList[] = [];
// Iterate over each attribute and transform the data
for (const [attributeName, attributes] of Object.entries(result)) {
const withImage: any[] = [];
const withoutImage: any[] = [];
// @ts-ignore
attributes.forEach((attribute) => {
attribute.has_color = false;
// Check if sku_image_url is not null or undefined
const hasImage =
attribute.sku_image_url !== null &&
attribute.sku_image_url !== undefined;
// Push the attribute to the appropriate array
if (hasImage) {
withImage.push(attribute);
} else {
withoutImage.push(attribute);
}
2 months ago
});
2 months ago
// Add has_image to the list item
list.push({
attribute_name: attributeName,
has_image: withImage.length > 0, // If there are any items with images, set has_image to true
attributes: [...withImage, ...withoutImage],
});
}
if (!priceSelectedSku) {
list.forEach((item) => {
2 months ago
item.attributes[0].has_color = true;
});
2 months ago
return list;
}
if (priceSelectedSku.length >= 1) {
priceSelectedSku.forEach((item) => {
list.forEach((item1) => {
item1.attributes.forEach((attribute) => {
if (attribute.value === item.value) {
2 months ago
attribute.has_color = true;
}
});
});
});
2 months ago
return list;
}
return list;
};
// 处理展开/收起
const toggleExpand = (attributeName: string) => {
setExpandedGroups((prev) => ({
...prev,
[attributeName]: !prev[attributeName],
}));
};
// 获取要显示的属性
const getDisplayAttributes = (attributes: any[], attributeName: string) => {
if (expandedGroups[attributeName]) {
return attributes;
}
return attributes.slice(0, 6);
};
// 处理尺码选择
const handleSizeSelect = (size: string, index: number) => {
3 weeks ago
setShowBottomSheet(true);
2 months ago
const newGroupList = [...groupList];
const attributeIndex = newGroupList[index]?.attributes.findIndex(
(item) => item.value === size
);
if (attributeIndex !== -1) {
newGroupList[index].attributes = newGroupList[index].attributes.map(
(item, i) => {
if (i === attributeIndex) {
return { ...item, has_color: true };
2 months ago
}
2 months ago
return { ...item, has_color: false };
}
);
setGroupList(newGroupList);
}
const selectedSku: SkuAttribute[] = [];
groupList.forEach((item) => {
item.attributes.forEach((attribute) => {
if (attribute.has_color) {
2 months ago
selectedSku.push(attribute);
}
});
});
let price = 0;
4 weeks ago
let original_price = 0;
product?.skus.forEach((item) => {
3 weeks ago
const values1 = item.attributes.map((item) => item.value).sort();
const values2 = selectedSku.map((item) => item.value).sort();
if (values1.every((val, index) => val === values2[index])) {
if (item.offer_price) {
price = item.offer_price;
4 weeks ago
original_price = item.original_price;
} else {
price =
product.sale_info.price_range_list[
product.sale_info.price_range_list.length - 1
].price;
3 weeks ago
original_price =
product.sale_info.price_range_list[
4 weeks ago
product.sale_info.price_range_list.length - 1
].original_price;
2 months ago
}
}
});
if (product) {
2 months ago
setProduct({
...product,
3 weeks ago
price: price === 0 ? t("no_stock") : price,
});
}
};
2 months ago
// 处理颜色选择
const handleColorSelect = (colorId: string, index: number) => {
3 weeks ago
setShowBottomSheet(true);
2 months ago
const newGroupList = [...groupList];
const attributeIndex = newGroupList[index]?.attributes.findIndex(
(item) => item.value === colorId
);
if (attributeIndex !== -1) {
newGroupList[index].attributes = newGroupList[index].attributes.map(
(item, i) => {
if (i === attributeIndex) {
return { ...item, has_color: true };
}
return { ...item, has_color: false };
}
);
setGroupList(newGroupList);
}
const selectedSku: SkuAttribute[] = [];
groupList.forEach((item) => {
item.attributes.forEach((attribute) => {
if (attribute.has_color) {
2 months ago
selectedSku.push(attribute);
}
});
});
let price = 0;
product?.skus.forEach((item) => {
const values1 = item.attributes.map((item) => item.value).sort();
const values2 = selectedSku.map((item) => item.value).sort();
if (values1.every((val, index) => val === values2[index])) {
if (item.offer_price) {
price = item.offer_price;
} else {
price =
product?.sale_info?.price_range_list[
product?.sale_info?.price_range_list?.length - 1
]?.price;
2 months ago
}
2 months ago
}
});
if (product) {
2 months ago
setProduct({
...product,
3 weeks ago
price: price === 0 ? t("no_stock") : price,
});
2 months ago
}
};
const getProductDetail = async () => {
if (!route.params?.offer_id) return;
1 month ago
setIsLoading(true);
try {
3 weeks ago
const res = await productApi.getProductDetail(
route.params.offer_id,
userStore.user?.user_id
);
1 month ago
if (res.skus != null) {
const priceSelectedSku = res.skus.find(
(item) => item.offer_price === route.params.price
);
if (priceSelectedSku) {
res.price = priceSelectedSku.offer_price;
4 weeks ago
res.original_price = priceSelectedSku.original_price;
1 month ago
} else {
res.price =
res?.sale_info?.price_range_list[
res?.sale_info?.price_range_list?.length - 1
]?.price;
3 weeks ago
res.original_price =
4 weeks ago
res?.sale_info?.price_range_list[
res?.sale_info?.price_range_list?.length - 1
]?.original_price;
1 month ago
}
} else {
res.price = route.params.price;
1 month ago
}
if (res.skus != null) {
const priceSelectedSku = res.skus.find(
(item) => item.offer_price === route.params.price
);
if (priceSelectedSku) {
setPriceSelectedSku({
price: route.params.price,
});
}
}
setPriceSelectedSku(priceSelectedSku);
1 month ago
setProduct(res);
let list: ProductGroupList[] = [];
if (res.skus != null) {
list = groupData(res, priceSelectedSku?.attributes as SkuAttribute[]);
} else {
list = [];
2 months ago
}
1 month ago
const imageUrls = [];
const regex = /<img[^>]+src="([^"]+)"/g;
let match;
while ((match = regex.exec(res.description)) !== null) {
imageUrls.push(match[1]); // match[1] 是 src 属性的值
}
// 只保留前 5 张图片(如果超过 5 张)
3 weeks ago
const limitedImageUrls =
imageUrls.length > 5 ? imageUrls.slice(0, 5) : imageUrls;
setImageUrls(limitedImageUrls);
1 month ago
setGroupList(list);
3 weeks ago
const previousScreen = navigation.getState().routes[navigation.getState().index - 1];
const data = {
offer_id: res.offer_id,
category_id: res.category_id,
price: res.price,
sku_id: priceSelectedSku?.sku_id,
currency: userStore.user?.currency,
product_name: res.subject,
product_img: res.product_image_urls[0],
timestamp: new Date().toISOString(),
}
logViewProduct(data,previousScreen?.name as string);
console.log(getBurialPointData());
1 month ago
} catch (error) {
console.error("Error fetching product details:", error);
} finally {
setIsLoading(false);
2 months ago
}
2 months ago
};
2 months ago
const getSimilars = () => {
3 weeks ago
productApi
.getSimilarProducts(route.params.offer_id, userStore.user?.user_id)
.then((res) => {
setSimilars(res);
setIsSimilarsFlag(true);
});
2 months ago
};
2 months ago
useEffect(() => {
2 months ago
getProductDetail();
getSimilars();
}, []);
2 months ago
useEffect(() => {
3 weeks ago
if (Platform.OS !== "web") {
const backHandler = BackHandler.addEventListener(
"hardwareBackPress",
() => {
if (showBottomSheet) {
setShowBottomSheet(false);
return true;
}
return false;
}
);
return () => backHandler.remove();
}
2 months ago
}, [showBottomSheet]);
2 months ago
const handleImageLoad = (src: string, event: any) => {
const { width: imageWidth, height: imageHeight } = event.nativeEvent.source;
const aspectRatio = imageHeight / imageWidth;
const calculatedHeight = width * aspectRatio;
setImageHeights((prev) => ({
2 months ago
...prev,
[src]: calculatedHeight,
2 months ago
}));
};
const handleSearchPress = useCallback(() => {
navigation.navigate("Search");
}, [navigation]);
const handleCameraPress = useCallback(() => {
setShowImagePickerModal(true);
}, []);
const handleProductPress = useCallback(
(item: similar) => {
InteractionManager.runAfterInteractions(() => {
navigation.push("ProductDetail", {
offer_id: item.offer_id,
price: item.min_price,
});
});
},
[navigation]
);
4 weeks ago
// Add this function to render skeleton UI
const renderSkeletonItems = () => {
// Create an array of 5 skeleton items
return Array(5).fill(0).map((_, index) => (
<View style={styles.productCard} key={`skeleton-${index}`}>
<View style={[styles.cardContainerWithPrice, styles.skeletonBox]} />
<View style={styles.priceContainerFlex}>
<View style={[styles.skeletonText, { width: 50 }]} />
<View style={[styles.skeletonText, { width: 30, marginLeft: 5 }]} />
</View>
</View>
));
};
// 清理expo-image-picker临时文件
const cleanupImagePickerCache = async () => {
try {
// Skip cache cleanup on web platform
if (Platform.OS === 'web') {
console.log('Cache cleanup skipped on web platform');
setGalleryUsed(false);
return;
}
// 相册选择后清理临时缓存
const cacheDir = `${FileSystem.cacheDirectory}ImagePicker`;
await FileSystem.deleteAsync(cacheDir, { idempotent: true });
console.log("已清理ImagePicker缓存");
// 立即重置状态,无需用户干预
setGalleryUsed(false);
} catch (error) {
console.log("清理缓存错误", error);
// Even if cleanup fails, reset the state
setGalleryUsed(false);
}
};
// 处理从相册选择
const handleChooseFromGallery = useCallback(async () => {
console.log("handleChooseFromGallery");
setShowImagePickerModal(false);
// 等待模态窗关闭后再执行
setTimeout(async () => {
try {
// 请求相册权限
const permissionResult =
await ImagePicker.requestMediaLibraryPermissionsAsync();
if (permissionResult.status !== "granted") {
console.log("相册权限被拒绝");
return;
}
// 打开相册
const result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
allowsEditing: true,
aspect: [4, 3],
quality: 1,
});
if (!result.canceled && result.assets && result.assets.length > 0) {
console.log("相册选择成功:", result.assets[0].uri);
await cleanupImagePickerCache();
navigation.navigate("ImageSearchResultScreen", {
image: result.assets[0].uri,
type: 1,
});
}
} catch (error: any) {
console.error("相册错误:", error);
// 出错时也清理缓存
await cleanupImagePickerCache();
}
}, 500);
}, [navigation, userStore.user]);
// 处理相机拍照
const handleTakePhoto = useCallback(async () => {
console.log("handleTakePhoto");
setShowImagePickerModal(false);
// 等待模态窗关闭后再执行
setTimeout(async () => {
try {
const permissionResult =
await ImagePicker.requestCameraPermissionsAsync();
if (permissionResult.status !== "granted") {
console.log("相机权限被拒绝");
return;
}
const result = await ImagePicker.launchCameraAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
allowsEditing: true,
aspect: [4, 3],
quality: 1,
});
if (!result.canceled && result.assets && result.assets.length > 0) {
console.log("拍照成功:", result.assets[0].uri);
// 使用后清理缓存
await cleanupImagePickerCache();
navigation.navigate("ImageSearchResultScreen", {
image: result.assets[0].uri,
type: 1,
});
}
} catch (error: any) {
console.error("相机错误:", error);
// 出错时也清理缓存
await cleanupImagePickerCache();
}
}, 500);
}, [navigation, userStore.user]);
// 重置应用状态函数
const resetAppState = useCallback(() => {
// 重置标记
setGalleryUsed(false);
// 清理缓存
cleanupImagePickerCache();
// 提示用户
Alert.alert("已重置", "现在您可以使用相机功能了");
}, []);
return (
3 weeks ago
<SafeAreaView style={styles.safeArea}>
<StatusBar barStyle="dark-content" backgroundColor="#fff" />
<View style={styles.safeAreaContent}>
<View style={styles.container}>
{isLoading ? (
<View style={styles.loadingContainer}>
<ActivityIndicator size="large" color="#FF5100" />
<Text style={styles.loadingText}>Loading product details...</Text>
</View>
) : (
<>
<View style={styles.headerBox}>
<TouchableOpacity
style={styles.backIcon}
onPress={() => navigation.goBack()}
>
<BackIcon size={fontSize(20)} />
</TouchableOpacity>
<TouchableOpacity
style={styles.search}
onPress={handleSearchPress}
activeOpacity={0.7}
>
<View style={{ width: '100%', alignItems: 'flex-start' }}>
<Text style={styles.searchText}>{t("search")}</Text>
</View>
</TouchableOpacity>
3 weeks ago
<TouchableOpacity
style={styles.searchIcon}
onPress={() => {
navigation.navigate("MainTabs", { screen: "Cart" });
}}
>
<ShoppingCartIcon size={fontSize(20)} />
<ShareIcon size={fontSize(20)} />
</TouchableOpacity>
</View>
<ScrollView
style={styles.scrollView}
contentContainerStyle={styles.scrollViewContent}
>
<View style={styles.productDetailsContainer3}>
<View style={styles.centerColumnWithPagination}>
<View style={{ position: "relative" }}>
<Carousel
loop
width={screenWidth}
data={product?.product_image_urls as string[]}
height={widthUtils(430, 430).height}
onSnapToItem={(index) => setActiveIndex(index)}
modeConfig={{
parallaxScrollingScale: 0.9,
parallaxScrollingOffset: 50,
}}
renderItem={({ item }) => (
<View
style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#f2f2f2",
borderRadius: 10,
}}
>
<Image
source={{ uri: item }}
style={{ width: "100%", height: "100%" }}
/>
</View>
)}
/>
1 month ago
<View
style={{
3 weeks ago
position: "absolute",
top: 20,
right: 20,
width: 40,
height: 40,
backgroundColor: "#efefef",
borderRadius: 20,
1 month ago
justifyContent: "center",
alignItems: "center",
}}
>
3 weeks ago
<TouchableOpacity
onPress={() => {
setIsHeartRed(!isHeartRed);
Alert.alert("收藏成功", "是否我的查看收藏", [
{
text: "取消",
onPress: () => console.log("取消 pressed"),
style: "cancel",
},
{
text: "确定",
onPress: () => console.log("确定 pressed"),
},
]);
}}
>
{isHeartRed ? (
<HeartRedIcon size={20} color="red" />
) : (
<HeartIcon size={20} color="#373737" />
)}
</TouchableOpacity>
1 month ago
</View>
3 weeks ago
{/* 底部指示灯 - 固定在右下角 */}
<View
style={{
position: "absolute",
bottom: 20,
right: 20,
backgroundColor: "gray", // 可选,看得清楚
borderRadius: 13,
justifyContent: "center",
alignItems: "center",
}}
>
<Text style={styles.activeIndexText}>
{activeIndex + 1}/{product?.product_image_urls?.length}
3 weeks ago
</Text>
1 month ago
</View>
</View>
2 months ago
</View>
3 weeks ago
<View style={styles.productDetailsContainer2}>
<View style={styles.nightLampProductCard}>
<Text style={styles.creativeHeading}>
{getSubjectTransLanguage(product)}
</Text>
<View style={styles.priceBox}>
<Text style={styles.priceLabel}>
{product?.original_price}
{userStore.user?.currency}
</Text>
</View>
<View style={styles.productInfoContainer1}>
<View style={styles.productInfoContainer}>
<View style={styles.salesInfoContainer}>
<Text style={styles.highlightedText}>
{product?.price}
</Text>
<Text style={styles.orangeHighlightedText}>
{userStore.user?.currency || "FCFA"}
1 month ago
</Text>
3 weeks ago
</View>
<Text style={styles.salesCountLabel}>
{product?.sold_out} {t("sales")}
</Text>
</View>
{userStore.user?.vip_level > 0 && (
<>
<View style={styles.discountInfoContainer}>
<Text style={styles.emphasizedTextWidget}>-5%</Text>
</View>
<View style={styles.priceInfoVip}>
<ImageBackground
source={require("../../assets/img/vip1.png")}
style={styles.priceInfoVipImg}
>
<Text style={styles.vipStatusNumeric}>
VIP {userStore.user?.vip_level}
</Text>
</ImageBackground>
</View>
</>
)}
</View>
</View>
<View style={styles.productDetailsContainer}>
<View style={styles.productDetailsContainer1}>
<View style={styles.blackThemeContainer}>
{groupList.map((item, index) =>
item.has_image ? (
<View key={item.attribute_name}>
<Text style={styles.uniqueTextBlock}>
{item.attribute_name} :{" "}
{
item.attributes.find((item) => item.has_color)
?.value
1 month ago
}
3 weeks ago
</Text>
<View style={styles.horizontalFlexContainer}>
{getDisplayAttributes(
item.attributes,
item.attribute_name
).map((attribute) => (
<TouchableOpacity
key={attribute.value}
onPress={() =>
handleColorSelect(attribute.value, index)
}
style={[
styles.colorImageContainer,
attribute.has_color &&
styles.selectedColorImageContainer,
]}
>
<Image
source={{ uri: attribute.sku_image_url }}
style={styles.imageContainer}
/>
</TouchableOpacity>
))}
{!expandedGroups[item.attribute_name] &&
item.attributes.length > 6 && (
<TouchableOpacity
style={styles.expandButton}
onPress={() =>
toggleExpand(item.attribute_name)
}
>
<Text style={styles.expandButtonText}>
+{item.attributes.length - 6}
</Text>
</TouchableOpacity>
)}
{expandedGroups[item.attribute_name] && (
<TouchableOpacity
style={styles.expandButton}
onPress={() =>
toggleExpand(item.attribute_name)
}
>
<Text style={styles.expandButtonText}>
</Text>
</TouchableOpacity>
)}
</View>
{groupList.length > 1 && index === 0 && (
1 month ago
<TouchableOpacity
3 weeks ago
style={styles.svgContainer6}
onPress={() => setShowBottomSheet(true)}
1 month ago
>
3 weeks ago
<View style={styles.svgContainer6}>
<DiagonalArrowIcon size={fontSize(18)} />
</View>
1 month ago
</TouchableOpacity>
)}
3 weeks ago
{groupList.length === 1 && index === 0 && (
<TouchableOpacity
style={styles.svgContainer6}
onPress={() => setShowBottomSheet(true)}
>
<View style={styles.svgContainer6}>
<DiagonalArrowIcon size={fontSize(18)} />
</View>
</TouchableOpacity>
)}
</View>
) : (
<View key={item.attribute_name}>
<Text style={styles.uniqueTextBlock}>
{item.attribute_name}
</Text>
<View style={styles.horizontalFlexContainer}>
{getDisplayAttributes(
item.attributes,
item.attribute_name
).map((attribute) => (
<TouchableOpacity
key={attribute.value}
onPress={() =>
handleSizeSelect(attribute.value, index)
}
style={[
styles.sizeButton,
attribute.has_color &&
styles.selectedSizeButton,
]}
>
<Text
style={[
styles.sizeButtonText,
attribute.has_color &&
styles.selectedSizeText,
]}
>
{attribute.value}
</Text>
</TouchableOpacity>
))}
{!expandedGroups[item.attribute_name] &&
item.attributes.length > 6 && (
<TouchableOpacity
style={styles.expandButton}
onPress={() =>
toggleExpand(item.attribute_name)
}
>
<Text style={styles.expandButtonText}>
</Text>
</TouchableOpacity>
)}
{expandedGroups[item.attribute_name] && (
<TouchableOpacity
style={styles.expandButton}
onPress={() =>
toggleExpand(item.attribute_name)
}
>
<Text style={styles.expandButtonText}>
</Text>
</TouchableOpacity>
)}
</View>
3 weeks ago
{groupList.length === 1 && (
<TouchableOpacity
style={styles.svgContainer6}
onPress={() => setShowBottomSheet(true)}
1 month ago
>
3 weeks ago
<View style={styles.svgContainer6}>
<DiagonalArrowIcon size={fontSize(18)} />
</View>
</TouchableOpacity>
)}
{groupList.length === 2 && index === 0 && (
1 month ago
<TouchableOpacity
3 weeks ago
style={styles.svgContainer6}
onPress={() => setShowBottomSheet(true)}
1 month ago
>
3 weeks ago
<View style={styles.svgContainer6}>
<DiagonalArrowIcon size={fontSize(18)} />
</View>
1 month ago
</TouchableOpacity>
)}
3 weeks ago
</View>
)
)}
</View>
</View>
1 month ago
</View>
3 weeks ago
<View style={styles.storeRecommendationsContainer}>
<View style={styles.storeInfoContainer}>
<Text style={styles.storeSectionTitle}>
More from this store
</Text>
{/* <Text style={styles.storeMoreLink}>View All</Text> */}
</View>
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
contentContainerStyle={styles.productGridContainer}
>
{isSimilarsFlag ?
similars?.map((item) => (
<TouchableOpacity
style={styles.productCard}
key={item.offer_id}
onPress={() => handleProductPress(item)}
>
<View style={styles.cardContainerWithPrice}>
<Image
source={{ uri: item.product_image_urls[0] }}
style={styles.imageContainerCompact}
/>
</View>
<View style={styles.priceContainerFlex}>
<Text style={styles.highlightedText1}>
{item.max_price}
</Text>
<Text style={styles.highlightedTextWithBorder}>
FCFA
</Text>
</View>
</TouchableOpacity>
))
: renderSkeletonItems()
}
</ScrollView>
</View>
<View style={{ width: "100%" }}>
{imageUrls.map((src, index) => (
<View key={index} style={{ width: "100%" }}>
<ExpoImage
style={{
width: "100%",
height: imageHeights[src] || 200,
backgroundColor: "#f5f5f5",
}}
source={{ uri: src }}
contentFit="contain"
onLoad={(event) => handleImageLoad(src, event)}
/>
</View>
))}
2 months ago
</View>
3 weeks ago
</View>
2 months ago
</View>
3 weeks ago
</ScrollView>
<View style={styles.fixedBottomBar}>
<TouchableOpacity style={styles.chatNowButton}>
<WhiteCircleIcon color="#fff" size={fontSize(20)} />
<Text style={styles.chatNowText}>chatNow</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.addToCartButton}
onPress={() => setShowBottomSheet(true)}
>
<ShoppingCartIcon color="#fff" size={fontSize(20)} />
<Text style={styles.addToCartText}>addToCart</Text>
</TouchableOpacity>
1 month ago
</View>
3 weeks ago
{showBottomSheet && product && (
<View style={styles.bottomSheetOverlay}>
<Animated.View style={[styles.bottomSheet]}>
<ProductCard
onClose={() => setShowBottomSheet(false)}
product={product}
groupList={groupList}
></ProductCard>
</Animated.View>
</View>
)}
</>
1 month ago
)}
3 weeks ago
</View>
</View>
{/* Image Picker Modal */}
<Modal
visible={showImagePickerModal}
animationType="slide"
transparent={true}
onRequestClose={() => setShowImagePickerModal(false)}
>
<TouchableOpacity
style={styles.imagePickerOverlay}
activeOpacity={1}
onPress={() => setShowImagePickerModal(false)}
>
<View style={styles.imagePickerContent}>
{!galleryUsed ? (
// 正常状态,显示相机选项
<TouchableOpacity
style={styles.imagePickerOption}
onPress={handleTakePhoto}
>
<CameraIcon size={24} color="#333" />
<Text style={styles.imagePickerText}></Text>
</TouchableOpacity>
) : (
// 已使用相册状态,显示重置选项
<TouchableOpacity
style={styles.imagePickerOption}
onPress={resetAppState}
>
<Text style={styles.imagePickerText}></Text>
</TouchableOpacity>
)}
<View style={styles.imagePickerDivider} />
<TouchableOpacity
style={styles.imagePickerOption}
onPress={handleChooseFromGallery}
>
<Text style={styles.imagePickerText}></Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.imagePickerCancelButton}
onPress={() => setShowImagePickerModal(false)}
>
<Text style={styles.imagePickerCancelText}></Text>
</TouchableOpacity>
</View>
</TouchableOpacity>
</Modal>
3 weeks ago
</SafeAreaView>
);
};
const styles = StyleSheet.create({
3 weeks ago
safeArea: {
flex: 1,
backgroundColor: '#fff',
},
safeAreaContent: {
flex: 1,
paddingTop: Platform.OS === 'android' ? 0 : 0,
3 weeks ago
},
container: {
flex: 1,
backgroundColor: '#fff',
},
2 months ago
scrollView: {
flex: 1,
2 months ago
backgroundColor: "white",
},
headerBox: {
width: "100%",
padding: 10,
justifyContent: "space-between",
flexDirection: "row",
3 weeks ago
alignItems: "center",
backgroundColor: "#fff",
2 months ago
},
3 weeks ago
backIcon: {
width: "5%",
alignItems: "flex-end",
},
search: {
width: "70%",
padding: 15,
backgroundColor: "#f4f4f4",
borderWidth: 1,
borderColor: "#eeeeee",
borderRadius: 25,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
},
searchText: {
fontSize: fontSize(16),
color: "#747474",
fontWeight: "600",
},
searchIcon: {
alignItems: "center",
justifyContent: "space-between",
flexDirection: "row",
width: "15%",
},
scrollViewContent: {},
2 months ago
productDetailsContainer3: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "flex-start",
width: "100%",
backgroundColor: "white",
},
2 months ago
timeCardContainer: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "flex-start",
paddingTop: 3,
paddingBottom: 15,
paddingLeft: 18,
},
timeInfoContainer: {
2 months ago
flexDirection: "row",
2 months ago
gap: 8,
2 months ago
alignItems: "center",
2 months ago
justifyContent: "space-between",
paddingLeft: 38,
},
2 months ago
timeDisplay: {
width: 42,
fontWeight: "600",
fontSize: fontSize(17),
color: "black",
textAlign: "center",
},
2 months ago
timeDisplayContainer: {
width: widthUtils(54, 154).width,
height: widthUtils(54, 54).height,
2 months ago
},
searchContainer1: {
2 months ago
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
2 months ago
marginTop: 2,
width: "100%",
2 months ago
},
backButtonContainer: {
width: "10%",
alignItems: "flex-start",
2 months ago
},
searchContainer2: {
width: "70%",
2 months ago
flexDirection: "row",
alignItems: "center",
height: widthUtils(50, 50).height,
paddingRight: 10,
paddingLeft: 10,
2 months ago
backgroundColor: "#f4f4f4",
borderWidth: 1,
borderColor: "#eeeeee",
borderRadius: 25,
marginRight: 10,
2 months ago
},
iconsContainer: {
width: "20%",
flexDirection: "row",
alignItems: "center",
justifyContent: "flex-start",
},
svgContainer: {
width: widthUtils(18, 18).width,
height: widthUtils(18, 18).height,
2 months ago
},
svgContainer1: {
width: widthUtils(24, 24).width,
height: widthUtils(24, 24).height,
2 months ago
color: "#373737",
justifyContent: "center",
2 months ago
alignItems: "center",
},
searchTitleTextStyle: {
fontWeight: "600",
fontSize: fontSize(16),
color: "#747474",
flex: 1,
2 months ago
},
2 months ago
svgContainer2: {
width: widthUtils(24, 24).width,
height: widthUtils(24, 24).height,
2 months ago
marginLeft: 11,
color: "#373737",
},
2 months ago
productDetailsContainer2: {
backgroundColor: "#f4f4f4",
},
2 months ago
centerColumnWithPagination: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "center",
width: "100%",
backgroundColor: "#f4f4f4",
},
centerContentWithPaginationButton: {
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
},
sidebarContainer: {
paddingLeft: 350,
},
centerIconContainer: {
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
width: widthUtils(40, 40).width,
height: widthUtils(40, 40).height,
2 months ago
backgroundColor: "#efefef",
borderRadius: 25,
},
centerBox1: {
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
width: widthUtils(60, 60).width,
height: widthUtils(60, 60).height,
2 months ago
marginTop: 125,
backgroundColor: "rgba(92, 92, 92, 0.6)",
borderWidth: 1,
borderColor: "white",
borderRadius: 35,
},
svgContainer3: {
width: widthUtils(20, 20).width,
height: widthUtils(20, 20).height,
2 months ago
color: "#ffffff",
},
darkButton: {
alignSelf: "flex-end",
width: widthUtils(26, 50).width,
height: widthUtils(26, 50).height,
2 months ago
minWidth: 50,
marginTop: 147,
fontWeight: "600",
fontSize: fontSize(12),
color: "white",
backgroundColor: "rgba(44, 44, 44, 0.7)",
borderRadius: 13,
},
nightLampProductCard: {
width: "100%",
padding: 16,
paddingLeft: 19,
paddingBottom: 23,
backgroundColor: "white",
},
creativeHeading: {
width: "100%",
fontWeight: "600",
fontSize: fontSize(18),
lineHeight: 22,
color: "black",
textAlign: "left",
},
productInfoContainer1: {
2 months ago
flexDirection: "row",
4 weeks ago
alignItems: "center",
2 months ago
justifyContent: "flex-start",
},
productInfoContainer: {
alignSelf: "flex-start",
2 months ago
},
2 months ago
salesInfoContainer: {
2 months ago
flexDirection: "row",
4 weeks ago
alignItems: "center",
2 months ago
justifyContent: "flex-start",
},
2 months ago
highlightedText: {
fontWeight: "700",
2 months ago
fontSize: fontSize(30),
2 months ago
color: "#ff5100",
2 months ago
},
2 months ago
orangeHighlightedText: {
fontWeight: "700",
2 months ago
fontSize: fontSize(14),
2 months ago
marginLeft: 1.25,
color: "#ff5100",
lineHeight: 28,
2 months ago
},
2 months ago
salesCountLabel: {
marginTop: 6.75,
fontWeight: "600",
fontSize: fontSize(14),
color: "#7c7c7c",
2 months ago
},
2 months ago
priceBox: {
4 weeks ago
marginTop: 15,
marginBottom: 5,
2 months ago
},
2 months ago
priceLabel: {
fontWeight: "600",
fontSize: fontSize(12),
color: "#9a9a9a",
3 weeks ago
textDecorationLine: "line-through",
},
2 months ago
priceContainer: {
width: "100%",
marginTop: -4.75,
borderTopWidth: 1,
borderTopColor: "#9a9a9a",
2 months ago
},
2 months ago
discountInfoContainer: {
flexDirection: "column",
alignItems: "center",
4 weeks ago
justifyContent: "center",
marginLeft: 10,
2 months ago
},
emphasizedTextWidget: {
fontStyle: "italic",
fontWeight: "900",
fontSize: fontSize(11),
color: "#4e2000",
4 weeks ago
backgroundColor: "#FFE4D6",
padding: 3,
borderRadius: 3,
2 months ago
},
2 months ago
vipStatusContainer: {
4 weeks ago
marginLeft: 10,
2 months ago
},
2 months ago
vipBadgeContainer: {
flexDirection: "column",
alignItems: "stretch",
4 weeks ago
justifyContent: "center",
paddingHorizontal: 10,
paddingVertical: 3,
2 months ago
backgroundColor: "#3b3b3b",
borderRadius: 5,
borderBottomLeftRadius: 0,
2 months ago
},
2 months ago
vipStatusNumeric: {
fontStyle: "italic",
fontWeight: "900",
3 weeks ago
fontSize: fontSize(18),
color: "#f1c355",
textAlign: "center",
marginLeft:2
},
2 months ago
emphasizedTextVip: {
fontStyle: "italic",
fontWeight: "900",
fontSize: fontSize(14),
2 months ago
},
2 months ago
emphasizedText: {
fontStyle: "italic",
fontWeight: "900",
fontSize: fontSize(14),
letterSpacing: -2,
},
2 months ago
productDetailsContainer: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "flex-start",
width: "100%",
padding: 10,
paddingLeft: 19,
paddingBottom: 13,
marginTop: 8,
backgroundColor: "white",
},
productDetailsContainer1: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "flex-start",
},
blackThemeContainer: {},
uniqueTextBlock: {
fontWeight: "600",
2 months ago
fontSize: fontSize(16),
2 months ago
lineHeight: 20,
color: "black",
},
2 months ago
horizontalFlexContainer: {
width: "100%",
2 months ago
flexDirection: "row",
2 months ago
flexWrap: "wrap",
gap: 10,
2 months ago
alignItems: "center",
2 months ago
justifyContent: "flex-start",
marginTop: 8,
2 months ago
},
2 months ago
imageContainer: {
width: widthUtils(40, 40).width,
height: widthUtils(40, 40).height,
2 months ago
borderRadius: 5,
},
2 months ago
centerBox: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "center",
width: widthUtils(40, 40).width,
2 months ago
backgroundColor: "#e0e0e0",
borderRadius: 5,
},
2 months ago
imageContainerStyles: {
height: widthUtils(40, 40).height,
2 months ago
},
2 months ago
svgContainer6: {
alignSelf: "flex-end",
width: widthUtils(18, 18).width,
height: widthUtils(18, 18).height,
2 months ago
},
2 months ago
sizeSelector: {
marginTop: 0,
2 months ago
},
2 months ago
numericHighlightedTextContainer: {
2 months ago
alignItems: "center",
2 months ago
justifyContent: "center",
height: widthUtils(30, 30).height,
paddingHorizontal: 11,
fontWeight: "400",
2 months ago
fontSize: fontSize(14),
2 months ago
color: "#ff5100",
backgroundColor: "#fff5f0",
borderWidth: 1,
borderColor: "#ff5100",
borderRadius: 5,
},
2 months ago
numberBadge: {
alignItems: "center",
justifyContent: "center",
height: widthUtils(30, 40).height,
paddingHorizontal: 11,
fontWeight: "400",
2 months ago
fontSize: fontSize(14),
2 months ago
color: "#373737",
backgroundColor: "#efefef",
borderRadius: 5,
lineHeight: widthUtils(40, 40).height,
2 months ago
marginBottom: 10,
},
2 months ago
sizeButton: {
2 months ago
alignItems: "center",
2 months ago
justifyContent: "center",
height: widthUtils(30, 40).height,
paddingHorizontal: 11,
backgroundColor: "#efefef",
borderRadius: 5,
marginBottom: 10,
},
3 weeks ago
priceInfoVip: {
width: widthUtils(21, 63).width,
height: widthUtils(21, 63).height,
marginLeft: 10,
},
priceInfoVipImg: {
width: "100%",
height: "100%",
justifyContent: "center",
alignItems: "center",
},
2 months ago
sizeButtonText: {
fontWeight: "400",
2 months ago
fontSize: fontSize(14),
2 months ago
color: "#373737",
lineHeight: widthUtils(30, 40).height,
},
2 months ago
selectedSizeButton: {
backgroundColor: "#fff5f0",
borderWidth: 1,
borderColor: "#ff5217",
},
2 months ago
selectedSizeText: {
color: "#ff5217",
fontWeight: "600",
2 months ago
},
2 months ago
expandButton: {
alignItems: "center",
justifyContent: "center",
height: widthUtils(38, 38).height,
2 months ago
paddingHorizontal: 11,
fontWeight: "600",
2 months ago
fontSize: fontSize(14),
2 months ago
color: "#ff5100",
borderRadius: 5,
lineHeight: widthUtils(40, 40).height,
marginBottom: 10,
backgroundColor: "#efefef",
2 months ago
},
2 months ago
expandButtonText: {
color: "#b7b7b7",
2 months ago
fontWeight: "600",
2 months ago
},
2 months ago
storeRecommendationsContainer: {
width: "100%",
padding: 10,
paddingLeft: 19,
paddingBottom: 19,
marginTop: 8,
backgroundColor: "white",
2 months ago
},
2 months ago
storeInfoContainer: {
flexDirection: "row",
gap: 8,
alignItems: "center",
justifyContent: "space-between",
width: "100%",
},
storeSectionTitle: {
fontWeight: "600",
2 months ago
fontSize: fontSize(16),
2 months ago
lineHeight: 20,
color: "black",
2 months ago
},
2 months ago
storeMoreLink: {
fontWeight: "600",
fontSize: fontSize(12),
color: "#747474",
2 months ago
},
2 months ago
productGridContainer: {
2 months ago
flexDirection: "row",
2 months ago
alignItems: "flex-start",
justifyContent: "flex-start",
marginTop: 12,
paddingRight: 10,
2 months ago
},
2 months ago
productCard: {
width: widthUtils(115, 90).width,
height: widthUtils(115, 90).height,
2 months ago
marginRight: 10,
2 months ago
},
2 months ago
cardContainerWithPrice: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "center",
width: "100%",
backgroundColor: "#e0e0e0",
2 months ago
borderRadius: 5,
},
2 months ago
imageContainerCompact: {
height: widthUtils(90, 90).height,
width: widthUtils(90, 90).width,
2 months ago
},
2 months ago
priceContainerFlex: {
flexDirection: "row",
alignItems: "center",
justifyContent: "flex-start",
marginTop: 2,
2 months ago
},
2 months ago
highlightedText1: {
fontWeight: "700",
2 months ago
fontSize: fontSize(16),
2 months ago
lineHeight: 20,
color: "#ff5100",
2 months ago
},
2 months ago
highlightedTextWithBorder: {
fontWeight: "700",
fontSize: fontSize(10),
marginLeft: 1.25,
color: "#ff5100",
2 months ago
},
2 months ago
productImageContainer: {
width: "100%",
height: widthUtils(90, 90).height,
2 months ago
borderRadius: 5,
2 months ago
},
2 months ago
orangeHighlightTextStyle: {
fontWeight: "700",
fontSize: fontSize(16),
lineHeight: widthUtils(20, 20).height,
2 months ago
marginTop: 2,
color: "#ff5100",
2 months ago
},
2 months ago
productDetailsContainer4: {
flexDirection: "column",
alignItems: "stretch",
justifyContent: "flex-start",
width: "100%",
marginTop: 8,
backgroundColor: "white",
2 months ago
},
2 months ago
productDetailsContainer5: {
padding: 10,
paddingLeft: 19,
paddingBottom: 183,
2 months ago
},
2 months ago
productDetailsDescription: {
width: "100%",
marginTop: 8,
fontWeight: "400",
2 months ago
fontSize: fontSize(14),
lineHeight: widthUtils(20, 20).height,
2 months ago
color: "#373737",
textAlign: "left",
2 months ago
},
2 months ago
imageContainer1: {
marginTop: -165,
marginRight: 20,
marginLeft: 20,
2 months ago
},
2 months ago
imageContainerStyles1: {
width: widthUtils(229, 390).width,
height: widthUtils(229, 390).height,
2 months ago
},
2 months ago
flexCenterButtons: {
flexDirection: "row",
2 months ago
alignItems: "center",
justifyContent: "center",
height: widthUtils(64, 64).height,
2 months ago
paddingRight: 20,
paddingLeft: 20,
marginTop: -64,
backgroundColor: "white",
2 months ago
},
2 months ago
gradientButton: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
gap: 4,
width: widthUtils(50, 160).width,
height: widthUtils(50, 160).height,
2 months ago
minWidth: 160,
fontWeight: "700",
fontSize: fontSize(18),
lineHeight: 22,
color: "white",
backgroundColor:
"linear-gradient(90deg, rgba(0, 183, 68, 1) 0%, rgba(28, 207, 95, 1) 100%)",
borderRadius: 30,
2 months ago
},
2 months ago
svgContainer7: {
width: widthUtils(24, 24).width,
height: widthUtils(24, 24).height,
2 months ago
color: "#ffffff",
2 months ago
},
2 months ago
orangeGradientButton: {
flexDirection: "row",
2 months ago
alignItems: "center",
2 months ago
justifyContent: "center",
gap: 7,
width: widthUtils(50, 220).width,
height: widthUtils(50, 220).height,
2 months ago
minWidth: 220,
marginLeft: 10,
fontWeight: "700",
fontSize: fontSize(18),
lineHeight: 22,
color: "white",
backgroundColor:
"linear-gradient(90deg, rgba(255, 128, 0, 1) 0%, rgba(255, 81, 0, 1) 100%)",
borderRadius: 30,
2 months ago
},
2 months ago
activeIndexText: {
color: "white",
2 months ago
fontSize: fontSize(12),
2 months ago
width: widthUtils(26, 50).width,
height: widthUtils(26, 50).height,
2 months ago
textAlign: "center",
2 months ago
lineHeight: widthUtils(26, 50).height + 2,
2 months ago
},
2 months ago
colorImageContainer: {
padding: 2,
borderRadius: 5,
2 months ago
},
2 months ago
selectedColorImageContainer: {
backgroundColor: "#fff5f0",
borderWidth: 1,
borderColor: "#ff5217",
2 months ago
},
fixedBottomBar: {
position: "absolute",
bottom: 10,
left: 0,
right: 0,
2 months ago
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
paddingHorizontal: 15,
backgroundColor: "transparent",
zIndex: 100,
height: widthUtils(60, 60).height,
2 months ago
},
chatNowButton: {
width: "40%",
height: widthUtils(50, 50).height,
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
paddingVertical: 0,
borderRadius: 30,
backgroundColor: "#4CAF50",
marginRight: 10,
elevation: 4,
shadowColor: "#000",
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.2,
shadowRadius: 3,
},
chatNowText: {
fontSize: fontSize(18),
color: "#fff",
fontWeight: "bold",
marginLeft: 8,
},
addToCartButton: {
width: "60%",
height: widthUtils(50, 50).height,
2 months ago
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
paddingVertical: 0,
borderRadius: 30,
backgroundColor: "#FF5722",
marginLeft: 10,
elevation: 4,
shadowColor: "#000",
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.2,
shadowRadius: 3,
},
addToCartText: {
fontSize: fontSize(18),
color: "#fff",
fontWeight: "bold",
marginLeft: 8,
},
2 months ago
modalContainer: {
backgroundColor: "rgba(0, 0, 0, 0.5)",
justifyContent: "flex-end",
2 months ago
},
2 months ago
modalContent: {
height: "90%",
backgroundColor: "white",
2 months ago
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
2 months ago
padding: 20,
2 months ago
},
2 months ago
closeButton: {
alignSelf: "flex-end",
2 months ago
padding: 10,
2 months ago
},
closeButtonText: {
fontSize: fontSize(16),
color: "#333",
2 months ago
},
2 months ago
bottomSheetOverlay: {
2 months ago
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
2 months ago
justifyContent: "flex-end",
zIndex: 200,
2 months ago
},
2 months ago
bottomSheet: {
2 months ago
backgroundColor: "#fff",
2 months ago
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
height: "85%",
zIndex: 1,
2 months ago
},
1 month ago
loadingContainer: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "white",
1 month ago
},
loadingText: {
marginTop: 10,
fontSize: fontSize(16),
color: "#666",
1 month ago
},
skeletonBox: {
backgroundColor: '#e0e0e0',
height: widthUtils(90, 90).height,
width: widthUtils(90, 90).width,
borderRadius: 5,
},
skeletonText: {
height: 16,
backgroundColor: '#e0e0e0',
borderRadius: 3,
},
imagePickerOverlay: {
flex: 1,
backgroundColor: "rgba(0, 0, 0, 0.5)",
justifyContent: "flex-end",
},
imagePickerContent: {
backgroundColor: "#fff",
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
paddingTop: 20,
},
imagePickerOption: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
paddingVertical: 15,
},
imagePickerText: {
fontSize: fontSize(16),
color: "#333",
marginLeft: 10,
},
imagePickerDivider: {
height: 1,
backgroundColor: "#eee",
marginHorizontal: 20,
},
imagePickerCancelButton: {
alignItems: "center",
paddingVertical: 15,
borderTopWidth: 1,
borderTopColor: "#eee",
marginTop: 10,
},
imagePickerCancelText: {
fontSize: fontSize(16),
color: "#333",
},
3 weeks ago
});