From 4f80cadfed22277c8c26bb618da272f843d81359 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Fri, 10 Apr 2020 00:09:25 +0200 Subject: [PATCH] Fixed event preview click and dark mode display --- src/components/Custom/CustomHTML.js | 2 +- .../Home/PreviewEventDashboardItem.js | 2 +- src/screens/HomeScreen.js | 20 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/Custom/CustomHTML.js b/src/components/Custom/CustomHTML.js index f04adca..1e3aa54 100644 --- a/src/components/Custom/CustomHTML.js +++ b/src/components/Custom/CustomHTML.js @@ -32,7 +32,7 @@ class CustomHTML extends React.Component { // Completely recreate the component on theme change to force theme reload if (this.props.theme.dark) return ( - + {this.getHTML()} ); diff --git a/src/components/Home/PreviewEventDashboardItem.js b/src/components/Home/PreviewEventDashboardItem.js index 90aa197..08015b3 100644 --- a/src/components/Home/PreviewEventDashboardItem.js +++ b/src/components/Home/PreviewEventDashboardItem.js @@ -13,7 +13,7 @@ import CustomHTML from "../Custom/CustomHTML"; * @param props Props to pass to the component * @return {*} */ -function PreviewEventDashboardItem(props) { +function PreviewEventDashboardItem(props : Object) { const isEmpty = props.event === undefined ? true : isDescriptionEmpty(props.event['description']); diff --git a/src/screens/HomeScreen.js b/src/screens/HomeScreen.js index 152a660..27df7c1 100644 --- a/src/screens/HomeScreen.js +++ b/src/screens/HomeScreen.js @@ -83,7 +83,7 @@ class HomeScreen extends React.Component { if (this.props.route.params.nextScreen !== undefined && this.props.route.params.nextScreen !== null) { this.props.navigation.navigate(this.props.route.params.nextScreen, this.props.route.params.data); // reset params to prevent infinite loop - this.props.navigation.dispatch(CommonActions.setParams({ nextScreen: null })); + this.props.navigation.dispatch(CommonActions.setParams({nextScreen: null})); } } }; @@ -137,7 +137,7 @@ class HomeScreen extends React.Component { id: SECTIONS_ID[1] } ]; - } + }; /** * Generates the dataset associated to the dashboard to be displayed in the FlatList as a section @@ -349,7 +349,7 @@ class HomeScreen extends React.Component { let displayEvent = this.getDisplayEvent(futureEvents); const clickContainerAction = () => this.props.navigation.navigate('planning'); - const clickPreviewAction = () => this.props.navigation.navigate('planning-information', {data: displayEvent}); + const clickPreviewAction = () => this.props.navigation.navigate('home-planning-information', {data: displayEvent}); return ( { const nav = this.props.navigation; return ( - +