mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
84d09e7dc6
no issue
22 lines
747 B
JavaScript
22 lines
747 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>
|
|
<FormHeader title="Reset password" error={error} errorText="Unable to reset password" />
|
|
<Form includeData={getTokenData(frameLocation)} onSubmit={handleSubmit}>
|
|
<PasswordInput bindTo="password" />
|
|
<FormSubmit label="Set password" />
|
|
</Form>
|
|
</div>
|
|
);
|