import React from 'react'; import { Dimensions, ImageBackground, ListRenderItemInfo, View } from 'react-native'; import { Button, Card, List, StyleService, Text, useStyleSheet } from '@ui-kitten/components'; import { CartIcon } from './extra/icons'; import { Product } from './extra/data'; const products: Product[] = [ Product.pinkChair(), Product.blackLamp(), Product.whiteChair(), Product.woodChair(), Product.pinkChair(), Product.blackLamp(), Product.whiteChair(), Product.woodChair(), ]; export const ProductListScreen = ({ navigation, route }): React.ReactElement => { const styles = useStyleSheet(themedStyles); const displayProducts: Product[] = products.filter(product => product.category === route.name); const onItemPress = (index: number): void => { navigation && navigation.navigate('ProductDetails3'); }; const onItemCartPress = (index: number): void => { navigation && navigation.navigate('ShoppingCart'); }; const renderItemFooter = (info: ListRenderItemInfo): React.ReactElement => ( {info.item.formattedPrice}