From 0f0b63bdd7fbb800bb61bb91466a77e1d9ab40a8 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Wed, 22 Apr 2020 19:44:30 +0200 Subject: [PATCH] Fixed broken reset button --- src/screens/Amicale/LoginScreen.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/screens/Amicale/LoginScreen.js b/src/screens/Amicale/LoginScreen.js index 3b83163..671a2d5 100644 --- a/src/screens/Amicale/LoginScreen.js +++ b/src/screens/Amicale/LoginScreen.js @@ -10,6 +10,7 @@ import {withCollapsible} from "../../utils/withCollapsible"; import {Collapsible} from "react-navigation-collapsible"; import CustomTabBar from "../../components/Tabbar/CustomTabBar"; import type {CustomTheme} from "../../managers/ThemeManager"; +import {Linking} from "expo"; type Props = { navigation: Object, @@ -30,7 +31,7 @@ type State = { const ICON_AMICALE = require('../../../assets/amicale.png'); -const RESET_PASSWORD_PATH = "password/reset"; +const RESET_PASSWORD_PATH = "https://www.amicale-insat.fr//password/reset"; const emailRegex = /^.+@.+\..+$/; @@ -67,10 +68,7 @@ class LoginScreen extends React.Component { handleSuccess = () => this.props.navigation.goBack(); - onResetPasswordClick = () => this.props.navigation.navigate('amicale-website', { - screen: 'amicale-website', - params: {path: RESET_PASSWORD_PATH} - }); + onResetPasswordClick = () => Linking.openURL(RESET_PASSWORD_PATH); validateEmail = () => this.setState({isEmailValidated: true});