From 64e643f5c6b9b0da2d2d12b1070c234f261f7ab5 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Mon, 21 Sep 2020 19:15:44 +0200 Subject: [PATCH] Allow clicking links on Planex title --- src/components/Dialogs/AlertDialog.js | 4 ++-- src/screens/Planex/PlanexScreen.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/Dialogs/AlertDialog.js b/src/components/Dialogs/AlertDialog.js index 28b89e9..4ad7aad 100644 --- a/src/components/Dialogs/AlertDialog.js +++ b/src/components/Dialogs/AlertDialog.js @@ -26,8 +26,8 @@ import i18n from 'i18n-js'; type PropsType = { visible: boolean, onDismiss: () => void, - title: string, - message: string, + title: string | React.Node, + message: string | React.Node, }; class AlertDialog extends React.PureComponent { diff --git a/src/screens/Planex/PlanexScreen.js b/src/screens/Planex/PlanexScreen.js index e353dd7..21f3aa1 100644 --- a/src/screens/Planex/PlanexScreen.js +++ b/src/screens/Planex/PlanexScreen.js @@ -20,11 +20,12 @@ // @flow import * as React from 'react'; -import {withTheme} from 'react-native-paper'; +import {Title, withTheme} from 'react-native-paper'; import i18n from 'i18n-js'; import {View} from 'react-native'; import {CommonActions} from '@react-navigation/native'; import {StackNavigationProp} from '@react-navigation/stack'; +import Autolink from 'react-native-autolink'; import type {CustomThemeType} from '../../managers/ThemeManager'; import ThemeManager from '../../managers/ThemeManager'; import WebViewScreen from '../../components/Screens/WebViewScreen'; @@ -46,7 +47,7 @@ type PropsType = { type StateType = { dialogVisible: boolean, - dialogTitle: string, + dialogTitle: string | React.Node, dialogMessage: string, currentGroup: PlanexGroupType, }; @@ -285,7 +286,7 @@ class PlanexScreen extends React.Component { showDialog = (title: string, message: string) => { this.setState({ dialogVisible: true, - dialogTitle: title, + dialogTitle: , dialogMessage: message, }); };