import React, { useState } from 'react'; import { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert } from 'react-native'; const AuthScreen = () => { const [email, setEmail] = useState(''); const [phone, setPhone] = useState(''); const [password, setPassword] = useState(''); const [isLogin, setIsLogin] = useState(true); const handleAuth = () => { if (isLogin) { // Handle login logic Alert.alert('Login attempt', `Email: ${email}\nPassword: ${password}`); } else { // Handle signup logic Alert.alert('Signup attempt', `Email: ${email}\nPhone: ${phone}\nPassword: ${password}`); } }; return ( {isLogin ? 'Connexion' : 'Inscription'} {!isLogin && ( )} {isLogin ? 'Se connecter' : 'S\'inscrire'} setIsLogin(!isLogin)}> {isLogin ? 'Pas de compte ? Inscrivez-vous' : 'Déjà un compte ? Connectez-vous'} ); }; const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', padding: 20, backgroundColor: '#fff', }, title: { fontSize: 24, fontWeight: 'bold', marginBottom: 20, color: '#000', textAlign: 'center', }, input: { height: 50, borderColor: '#ddd', borderWidth: 1, borderRadius: 8, paddingHorizontal: 15, marginBottom: 15, backgroundColor: '#fff', }, button: { height: 50, backgroundColor: '#000', borderRadius: 8, justifyContent: 'center', alignItems: 'center', marginTop: 10, }, buttonText: { color: '#fff', fontWeight: 'bold', fontSize: 16, }, switchText: { marginTop: 20, color: '#888', textAlign: 'center', }, }); export default AuthScreen; import React from 'react'; import { View, Text, StyleSheet, FlatList, Image, TouchableOpacity } from 'react-native'; const HomeScreen = ({ navigation }) => { const categories = [ { id: '1', name: 'Homme', image: require('../assets/men.jpg') }, { id: '2', name: 'Femme', image: require('../assets/women.jpg') }, { id: '3', name: 'Enfants', image: require('../assets/kids.jpg') }, ]; const featuredProducts = [ { id: '1', name: 'T-Shirt Noir', price: '29.99€', image: require('../assets/tshirt.jpg') }, { id: '2', name: 'Jean Slim', price: '59.99€', image: require('../assets/jeans.jpg') }, { id: '3', name: 'Chaussures', price: '89.99€', image: require('../assets/shoes.jpg') }, ]; return ( {/* Hero Banner */} {/* Categories */} Catégories ( {item.name} )} keyExtractor={item => item.id} /> {/* Featured Products */} Nouveautés ( navigation.navigate('Product', { product: item })} > {item.name} {item.price} )} keyExtractor={item => item.id} /> ); }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', padding: 10, }, hero: { height: 200, marginBottom: 20, }, heroImage: { width: '100%', height: '100%', borderRadius: 8, }, sectionTitle: { fontSize: 18, fontWeight: 'bold', marginVertical: 10, color: '#000', }, categoryCard: { width: 120, marginRight: 10, alignItems: 'center', }, categoryImage: { width: 100, height: 100, borderRadius: 50, }, categoryText: { marginTop: 5, color: '#000', }, productCard: { width: 150, marginRight: 10, }, productImage: { width: '100%', height: 180, borderRadius: 8, }, productName: { marginTop: 5, color: '#000', }, productPrice: { fontWeight: 'bold', color: '#000', }, }); export default HomeScreen; import React from 'react'; import { StyleSheet, View, Text } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { createStackNavigator } from '@react-navigation/stack'; // Screens import HomeScreen from './screens/HomeScreen'; import ProductScreen from './screens/ProductScreen'; import CartScreen from './screens/CartScreen'; import ProfileScreen from './screens/ProfileScreen'; import AuthScreen from './screens/AuthScreen'; const Tab = createBottomTabNavigator(); const Stack = createStackNavigator(); function HomeStack() { return ( ); } function App() { return ( ); } const styles = StyleSheet.create({ tabBar: { backgroundColor: '#fff', borderTopColor: '#eee', }, }); export default App;