BookmarkPage.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { FlatList, StyleSheet, Text, View } from 'react-native'
  2. import React from 'react'
  3. import NoBookmarkSection from '../components/organisms/Sections/NoBookmarkSection'
  4. import HorizontalNewsCardVariant from '../components/organisms/Cards/HorizontalNewsCardVariant';
  5. import fonts from '../theme/fonts';
  6. import SearchTextInput from '../components/molecules/SearchTextInput';
  7. const BookmarkPage = () => {
  8. const data = ["1", "2", "3", "4", "5"];
  9. //const data = []
  10. return (
  11. <View>
  12. {data.length <= 0 ? <NoBookmarkSection /> :
  13. <View style={styles.container}>
  14. <View >
  15. <SearchTextInput/>
  16. <FlatList
  17. showsVerticalScrollIndicator={false}
  18. ItemSeparatorComponent={() => <View style={{height: fonts.getSize(8)}}></View>}
  19. // ListFooterComponent={() => <View style={{height: fonts.getSize(16)}}></View>}
  20. ListHeaderComponent={() => <View style={{height: fonts.getSize(16)}}></View>}
  21. data={data}
  22. renderItem={(item) => <HorizontalNewsCardVariant onPress={true}/>}
  23. keyExtractor={item => data.indexOf(item)}
  24. />
  25. </View>
  26. </View>
  27. }
  28. </View>
  29. )
  30. }
  31. export default BookmarkPage
  32. const styles = StyleSheet.create({
  33. container: {
  34. paddingHorizontal: fonts.getSize(16),
  35. }
  36. })