Browse Source

Use built in webview to display password reset page

Arnaud Vergnet 3 years ago
parent
commit
57f7716700
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      src/screens/Amicale/LoginScreen.js

+ 3
- 4
src/screens/Amicale/LoginScreen.js View File

@@ -1,7 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import {Animated, KeyboardAvoidingView, Linking, StyleSheet, View} from "react-native";
4
+import {Animated, KeyboardAvoidingView, StyleSheet, View} from "react-native";
5 5
 import {Avatar, Button, Card, HelperText, Paragraph, TextInput, withTheme} from 'react-native-paper';
6 6
 import ConnectionManager from "../../managers/ConnectionManager";
7 7
 import i18n from 'i18n-js';
@@ -30,7 +30,7 @@ type State = {
30 30
 
31 31
 const ICON_AMICALE = require('../../../assets/amicale.png');
32 32
 
33
-const RESET_PASSWORD_PATH = "https://www.amicale-insat.fr//password/reset";
33
+const RESET_PASSWORD_PATH = "https://www.amicale-insat.fr/password/reset";
34 34
 
35 35
 const emailRegex = /^.+@.+\..+$/;
36 36
 
@@ -70,7 +70,6 @@ class LoginScreen extends React.Component<Props, State> {
70 70
             else
71 71
                 this.nextScreen = null;
72 72
         }
73
-        console.log(this.nextScreen);
74 73
     }
75 74
 
76 75
     showErrorDialog = (error: number) =>
@@ -88,7 +87,7 @@ class LoginScreen extends React.Component<Props, State> {
88 87
             this.props.navigation.replace(this.nextScreen);
89 88
     };
90 89
 
91
-    onResetPasswordClick = () => Linking.openURL(RESET_PASSWORD_PATH);
90
+    onResetPasswordClick = () => this.props.navigation.navigate('amicale-website', {path: RESET_PASSWORD_PATH});
92 91
 
93 92
     validateEmail = () => this.setState({isEmailValidated: true});
94 93
 

Loading…
Cancel
Save