import * as React from 'react'; import OpenInputField from '@/components/forms/OpenInputField'; import { Link } from 'react-router-dom'; import requestPasswordResetEmail from '@/api/auth/requestPasswordResetEmail'; type Props = Readonly<{ }>; type State = Readonly<{ email: string; isSubmitting: boolean; }>; export default class ForgotPasswordContainer extends React.PureComponent { state: State = { email: '', isSubmitting: false, }; handleFieldUpdate = (e: React.ChangeEvent) => this.setState({ email: e.target.value, }); handleSubmission = (e: React.FormEvent) => this.setState({ isSubmitting: true }, () => { e.preventDefault(); requestPasswordResetEmail(this.state.email) .then(() => { }) .catch(console.error) .then(() => this.setState({ isSubmitting: false })); }); render () { return (
Return to Login
); } }