Fix compiles

This commit is contained in:
Paulo Gustavo Veiga 2020-12-20 15:55:50 -08:00
parent b59ede3fcc
commit d0ad7f4286

View File

@ -16,10 +16,6 @@ type ForgotPasswordProps = {
const ForgotPassword = (props: ServiceProps) => { const ForgotPassword = (props: ServiceProps) => {
const [email, setEmail] = useState(''); const [email, setEmail] = useState('');
const [errorMsg, setErrorMsg] = useState(''); const [errorMsg, setErrorMsg] = useState('');
<<<<<<< HEAD
=======
>>>>>>> 9a3a179 (Initial version of maps list. WIP)
const [disableButton, setDisableButton] = useState(false); const [disableButton, setDisableButton] = useState(false);
const history = useHistory(); const history = useHistory();
@ -30,20 +26,12 @@ const ForgotPassword = (props: ServiceProps) => {
setDisableButton(true); setDisableButton(true);
// Call Service ... // Call Service ...
<<<<<<< HEAD
props.service.resetPassword(
email,
() => history.push("/c/forgot-password-success"),
(errorInfo) => {
setErrorMsg(errorInfo.msg ? errorInfo.msg : '');
=======
const service = props.service; const service = props.service;
service.resetPassword(email) service.resetPassword(email)
.then(() => { .then(() => {
history.push("/c/forgot-password-success"); history.push("/c/forgot-password-success");
}).catch((error: ErrorInfo) => { }).catch((error: ErrorInfo) => {
setErrorMsg(error.msg ? error.msg : ''); setErrorMsg(error.msg ? error.msg : '');
>>>>>>> 9a3a179 (Initial version of maps list. WIP)
setDisableButton(false); setDisableButton(false);
}); });
} }