Ghost/ghost/members-auth-pages/pages/ResetPasswordPage.js
Rish 19f243aed1 Refactored members auth flow with dynamic settings
no issue

- Updated members auth flow UI
- Updated members settings and routing to be dynamic
2019-05-07 17:15:50 +02:00

22 lines
792 B
JavaScript

import FormHeader from '../components/FormHeader';
import PasswordInput from '../components/PasswordInput';
import FormSubmit from '../components/FormSubmit';
import Form from '../components/Form';
const getTokenData = frameLocation => {
const params = new URLSearchParams(frameLocation.query);
const token = params.get('token') || '';
return { token };
};
export default ({ error, frameLocation, handleSubmit }) => (
<div className="gm-modal-form">
<FormHeader title="Reset password" error={error} errorText="Unable to reset password" />
<Form includeData={getTokenData(frameLocation)} onSubmit={handleSubmit}>
<PasswordInput bindTo="password" className="single" />
<FormSubmit label="Set password" />
</Form>
</div>
);