HomePage.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { StyleSheet, Text, View, ScrollView, TouchableWithoutFeedback } from 'react-native'
  2. import React from 'react'
  3. import CategorySection from '../../components/organisms/Sections/CategorySection'
  4. import RecentPostsSection from '../../components/organisms/Sections/RecentPostsSection'
  5. import TrendingSection from '../../components/organisms/Sections/TrendingSection'
  6. import NewscoutHomeHeader from '../../components/molecules/Header/NewscoutHomeHeader'
  7. import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
  8. import colors from '../../constants/colors'
  9. const HomePage = props => {
  10. const { navigation, route } = props
  11. return (
  12. <View style={{backgroundColor: colors().dominant}}>
  13. <ScrollView showsHorizontalScrollIndicator={false}>
  14. <NewscoutHomeHeader>
  15. <View style={{ alignItems: 'center', flexDirection: 'row', gap: 16 }}>
  16. <TouchableWithoutFeedback onPress={() => navigation.navigate('NotificationPage')}>
  17. <MaterialIcon name='notifications-none' color={colors().secondaryColor} size={30} />
  18. </TouchableWithoutFeedback>
  19. <TouchableWithoutFeedback onPress={() => navigation.toggleDrawer()}>
  20. <MaterialIcon name='list' color={colors().primaryColor} size={30} />
  21. </TouchableWithoutFeedback>
  22. </View>
  23. </NewscoutHomeHeader>
  24. <TrendingSection navigation={navigation}/>
  25. <CategorySection navigation={navigation} />
  26. <RecentPostsSection />
  27. </ScrollView>
  28. </View>
  29. )
  30. }
  31. export default HomePage
  32. const styles = StyleSheet.create({})