94 lines
2.4 KiB
TypeScript
94 lines
2.4 KiB
TypeScript
import { View, Text, StyleSheet, ScrollView,TouchableOpacity } from 'react-native';
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
import { ArrowLeft } from 'lucide-react-native';
|
|
import { router } from "expo-router";
|
|
import ProductCard from '../../components/ProductCard';
|
|
import COLORS from '@/app/constants/colors';
|
|
|
|
const products = [
|
|
{
|
|
id: '1',
|
|
name: 'Café Brix Premium',
|
|
image: 'https://images.unsplash.com/photo-1559056199-641a0ac8b55e?w=200&h=300&fit=crop',
|
|
description: '50% robusta • 50% arabica',
|
|
price: 10,
|
|
inStock: true,
|
|
},
|
|
{
|
|
id: '2',
|
|
name: 'Café Brix Gold',
|
|
image: 'https://images.unsplash.com/photo-1587734361993-0275d60eb3d0?w=200&h=300&fit=crop',
|
|
description: '30% robusta • 70% arabica',
|
|
price: 12,
|
|
inStock: false,
|
|
},
|
|
{
|
|
id: '3',
|
|
name: 'Café Brix Prestige',
|
|
image: 'https://images.unsplash.com/photo-1559525839-b184a4d698c7?w=200&h=300&fit=crop',
|
|
description: '70% robusta • 30% arabica',
|
|
price: 11,
|
|
inStock: true,
|
|
},
|
|
{
|
|
id: '4',
|
|
name: 'Café Brix Turc',
|
|
image: 'https://images.unsplash.com/photo-1562447457-579fc34967fb?w=200&h=300&fit=crop',
|
|
description: '50% robusta • 50% arabica',
|
|
price: 10,
|
|
inStock: true,
|
|
},
|
|
|
|
];
|
|
|
|
export default function GrainsScreen() {
|
|
return (
|
|
<SafeAreaView style={styles.container}>
|
|
<View style={styles.header}>
|
|
<TouchableOpacity style={styles.backButton} onPress={() => router.back()}>
|
|
<ArrowLeft size={24} color="#666" />
|
|
</TouchableOpacity>
|
|
<Text style={styles.headerTitle}>Grains de café</Text>
|
|
</View>
|
|
|
|
<ScrollView style={styles.content}>
|
|
{products.map((product) => (
|
|
<ProductCard key={product.id} {...product} />
|
|
))}
|
|
</ScrollView>
|
|
</SafeAreaView>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
backgroundColor: '#fff',
|
|
},
|
|
header: {
|
|
height: 60,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
position: 'relative',
|
|
backgroundColor: '#fff',
|
|
borderBottomWidth: 1,
|
|
borderBottomColor: '#eee',
|
|
marginTop:5,
|
|
},
|
|
backButton: {
|
|
position: 'absolute',
|
|
left: 20,
|
|
top: '50%',
|
|
transform: [{ translateY: -12 }],
|
|
},
|
|
headerTitle: {
|
|
fontSize: 20,
|
|
fontWeight: '600',
|
|
color: '#333',
|
|
},
|
|
content: {
|
|
flex: 1,
|
|
padding: 8,
|
|
backgroundColor:COLORS.background_user ,
|
|
},
|
|
}); |