-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
49 lines (46 loc) · 1.01 KB
/
App.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
import React from 'react';
import {
SafeAreaView,
ScrollView,
StyleSheet,
Text,
View,
FlatList,
} from 'react-native';
import Header from './components/Header';
import dummyData from './assets/dummyData.json';
import SimpleCard from './components/SimpleCard';
const styles = StyleSheet.create({
safeArea: {
backgroundColor: '#eb0042',
},
container: {
padding: 15,
backgroundColor: '#fff',
},
text: {
paddingBottom: 20,
fontSize: 36,
},
});
const App = () => {
return (
<SafeAreaView style={styles.safeArea}>
<Header />
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={styles.container}>
<View>
<Text style={styles.text}>TV Shows</Text>
<FlatList
data={dummyData}
renderItem={({item}) => <SimpleCard data={item} />}
horizontal={true}
showsHorizontalScrollIndicator={false}
/>
</View>
</ScrollView>
</SafeAreaView>
);
};
export default App;