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
 // @flow
1
 // @flow
2
 
2
 
3
 import * as React from 'react';
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
 import {Avatar, Button, Card, HelperText, Paragraph, TextInput, withTheme} from 'react-native-paper';
5
 import {Avatar, Button, Card, HelperText, Paragraph, TextInput, withTheme} from 'react-native-paper';
6
 import ConnectionManager from "../../managers/ConnectionManager";
6
 import ConnectionManager from "../../managers/ConnectionManager";
7
 import i18n from 'i18n-js';
7
 import i18n from 'i18n-js';
30
 
30
 
31
 const ICON_AMICALE = require('../../../assets/amicale.png');
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
 const emailRegex = /^.+@.+\..+$/;
35
 const emailRegex = /^.+@.+\..+$/;
36
 
36
 
70
             else
70
             else
71
                 this.nextScreen = null;
71
                 this.nextScreen = null;
72
         }
72
         }
73
-        console.log(this.nextScreen);
74
     }
73
     }
75
 
74
 
76
     showErrorDialog = (error: number) =>
75
     showErrorDialog = (error: number) =>
88
             this.props.navigation.replace(this.nextScreen);
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
     validateEmail = () => this.setState({isEmailValidated: true});
92
     validateEmail = () => this.setState({isEmailValidated: true});
94
 
93
 

Loading…
Cancel
Save