Use built in webview to display password reset page

This commit is contained in:
Arnaud Vergnet 2020-06-26 13:25:20 +02:00
parent d07b34c748
commit 4cdadbc6c1

View file

@ -2,7 +2,6 @@
import * as React from 'react'; import * as React from 'react';
import WebViewScreen from "../../../components/Screens/WebViewScreen"; import WebViewScreen from "../../../components/Screens/WebViewScreen";
import {CommonActions} from "@react-navigation/native";
const URL = 'https://www.amicale-insat.fr/'; const URL = 'https://www.amicale-insat.fr/';
/** /**
@ -15,10 +14,9 @@ export const AmicaleWebsiteScreen = (props: Object) => {
if (props.route.params.path !== undefined && props.route.params.path !== null) { if (props.route.params.path !== undefined && props.route.params.path !== null) {
path = props.route.params.path; path = props.route.params.path;
path = path.replace(URL, ''); path = path.replace(URL, '');
// reset params to prevent infinite loop
props.navigation.dispatch(CommonActions.setParams({path: null}));
} }
} }
console.log(URL + path);
return ( return (
<WebViewScreen <WebViewScreen
{...props} {...props}