|
@@ -5,7 +5,7 @@ import {FlatList} from 'react-native';
|
5
|
5
|
import i18n from "i18n-js";
|
6
|
6
|
import DashboardItem from "../../components/Home/EventDashboardItem";
|
7
|
7
|
import WebSectionList from "../../components/Screens/WebSectionList";
|
8
|
|
-import {withTheme} from 'react-native-paper';
|
|
8
|
+import {Headline, withTheme} from 'react-native-paper';
|
9
|
9
|
import FeedItem from "../../components/Home/FeedItem";
|
10
|
10
|
import SmallDashboardItem from "../../components/Home/SmallDashboardItem";
|
11
|
11
|
import PreviewEventDashboardItem from "../../components/Home/PreviewEventDashboardItem";
|
|
@@ -228,7 +228,7 @@ class HomeScreen extends React.Component<Props, State> {
|
228
|
228
|
id: SECTIONS_ID[0]
|
229
|
229
|
},
|
230
|
230
|
{
|
231
|
|
- title: '',
|
|
231
|
+ title: i18n.t("screens.home.feedTitle"),
|
232
|
232
|
data: this.currentNewFeed,
|
233
|
233
|
id: SECTIONS_ID[1]
|
234
|
234
|
}
|
|
@@ -511,6 +511,21 @@ class HomeScreen extends React.Component<Props, State> {
|
511
|
511
|
this.fabRef.current.onScroll(event);
|
512
|
512
|
};
|
513
|
513
|
|
|
514
|
+ renderSectionHeader = (data: { [key: string]: any }) => {
|
|
515
|
+ if (data.section.title !== "")
|
|
516
|
+ return (
|
|
517
|
+ <Headline style={{
|
|
518
|
+ textAlign: "center",
|
|
519
|
+ marginTop: 50,
|
|
520
|
+ marginBottom: 10,
|
|
521
|
+ }}>
|
|
522
|
+ {data.section.title}
|
|
523
|
+ </Headline>
|
|
524
|
+ )
|
|
525
|
+ else
|
|
526
|
+ return null;
|
|
527
|
+ }
|
|
528
|
+
|
514
|
529
|
/**
|
515
|
530
|
* Callback when pressing the login button on the banner.
|
516
|
531
|
* This hides the banner and takes the user to the login page.
|
|
@@ -540,6 +555,7 @@ class HomeScreen extends React.Component<Props, State> {
|
540
|
555
|
itemHeight={FEED_ITEM_HEIGHT}
|
541
|
556
|
onScroll={this.onScroll}
|
542
|
557
|
showError={false}
|
|
558
|
+ renderSectionHeader={this.renderSectionHeader}
|
543
|
559
|
/>
|
544
|
560
|
</View>
|
545
|
561
|
<MascotPopup
|