-
Notifications
You must be signed in to change notification settings - Fork 0
/
Redux1.tsx
81 lines (77 loc) · 10.2 KB
/
Redux1.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import React, {useEffect} from 'react';
import {useState} from 'react';
import {
Text, //First letter Capital
View,
Button,
StyleSheet,
TextInput,
FlatList,
ScrollView,
KeyboardAvoidingView,
TouchableOpacity,
ActivityIndicator,
Modal,
Pressable,
StatusBar,
Platform,
Image,
} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {Home} from './components/Home';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
import axios from 'axios';
import APIs from './components/APIs';
import AsyncStorage from '@react-native-async-storage/async-storage';
import Header from './components/redux/Header';
import Product from './components/redux/Product';
const App = () => {
const products = [
{
name: 'Apple',
color: 'white',
price: 50,
image:
'https://i.pinimg.com/736x/9f/75/05/9f7505ff624115b1d32816ca1506cef9.jpg',
},
{
name: 'Orange',
color: 'white',
price: 30,
image:
'https://img.freepik.com/free-photo/orange-white-white_144627-16571.jpg',
},
{
name: 'Mango',
color: 'white',
price: 40,
image:
'https://img.freepik.com/premium-photo/fresh-mango-fruit-with-cut-green-leafs-isolated_80510-476.jpg',
},
{
name: 'Spinach',
color: 'white',
price: 48,
image:
'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUUFBgWFhYWGRgaGRocHBwcHCQcJRgdHxkaHBkaHB0eJC4lHB4rIRwaJzgmKy8xNTU1GiU7QDs0Py40NTEBDAwMEA8QHxISHzQrJSs0NDQ3PzY0NDQ0ND00NDQ0NDQ0ND80NDQ0ND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d9VYaZTf25f54zzj8ab26i9hyHiTv9vWWvkbXxwCcgOnI8x1W/TpPGL4a+LpmjQUNUPeVcwGYr3jYnQEqG3PtIX4rk3vL5/THCF8Q1Ug5UUi/LM2gA/45vtNOHG90nytJuqK2AxeHGSrQqoAbksht5hwCp8wTMP+oY7N95+k5rVcFSf5qaN+ZQf1E7Mumlu5Vux+dVDOQASSToBqSegG5nTew/Y10ZcRiBlI1Smd77hm6W3C79bWtL9RwlNPkRF/KoX9BNiW4+CY3du0zHT7EROhYiIgIiICIiAiIgIiICIiAiIgIiICIiBWO1/ZsYtAyELWQd1tgw3yt4dDyPmZx/H/ABKL/DqqyMmhU+ZN+ltdxoZ+hpH8T4PQxK5a1JHA2JGo/Kw1HoZzcvT453c9VcsduCDFaaT2VDrc7+o8v3nQuJf0xQnNh6pT/a4zD0YWIHmDMOA/pxVv/drIq88gLE+RawHsZz/QynjSnbVQ4PwapiKq06YJJ1JOyLzZjyH67TtXBeFphaIpINBqTzZjux8T/A5RwjhNLDJkpLYcydSx6seZ+w5SRnVxcMw831Xk0+xETdYiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiB//9k=',
},
];
return (
<View style={styles.container}>
<ScrollView>
<Header />
{products.map(item => (
<Product item={item} />
))}
</ScrollView>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
export default App;