Refactor Password Reset: Convert Class-Based Component to Functional Component#7697
Conversation
|
@wesleybl Can u please Review this PR? |
| <FormattedMessage | ||
| id="Your password has been set successfully. You may now {link} with your new password." | ||
| defaultMessage="Your password has been set successfully. You may now {link} with your new password." |
There was a problem hiding this comment.
It's better to use successRedirectToLoginBody.
|
@wesleybl I have made suggested changes |
wesleybl
left a comment
There was a problem hiding this comment.
The Cancel button does not seem to perform any action. However, I checked the previous class-based implementation and it behaved the same way.
Since this PR focuses on migrating to a functional component and does not introduce this behavior, I suggest we address this in a separate PR to keep the scope clean.
So,
LGTM
|
@Manik-Khajuria-5 Thank you! Could you please do a backport to Volto 18? If you could see the Cancel button, that would be great! |
|
@wesleybl I will do backporting right now and I will make PR for the cancel button as soon as possible |
@wesleybl hey do u want me to remove cancel button or go through the password component so that cancel button works properly . Please lemme know as per ur convienence |
|
@Manik-Khajuria-5 I think the cancel button might redirect to the portal's homepage. |
|
@wesleybl okk got it |
* main: (122 commits) Release 19.0.0-alpha.27 Release @plone/slate 19.0.0-alpha.12 Release @plone/razzle 1.0.0-alpha.1 We do not release @plone/client from here Handle create-user 500 responses where body contains 'message' instead of 'error' (#7946) Dropzone filewidget a11y (#7956) Update css-minimizer-webpack-plugin to v7 and keep razzleOptions.enableSourceMaps control (#7934) Refactor Password Reset: Convert Class-Based Component to Functional Component (#7697) fix: Fixed searchable types in Object Browser Widget, adding also sel… (#7942) Fix in-page drag-and-drop for the Listing block in Volto 18 and 19 (#7907) Improved docs of Plone REST API JavaScript Client (#5576) Fix Moderate Comments control panel visibility based on Discussion Support addon installation (#7878) fix: Add authorization error handling to control panels (#7807) Fix subordering order tab (#7937) (#7939) Fix converting value to html in HtmlSlateWidget (#7938) razzle.config.js: Fix defaultPlugins missing name property to enable addon SCSS plugin replacement (#7908) Update users controlpanel to work with new response format (#7895) Avoid storing blocksClipboard in localstorage until it has a value (#7925) Remove link to Jobfamilie MEDICE: site is no longer a Volto site (redirects to non-Volto destination) (#7929) Exclude `.storybook` from ESLint's default hidden directory ignore list via `.eslintignore` to allow linting of Storybook configuration files (#7898) ...
Issue number
Contributes to #4460
Description
This PR refactors the PasswordReset component by converting it from a legacy class-based React component into a modern functional component using React hooks.
Key Changes
useEffectfor handling success state updatesuseStatethisbindingssetInitialPassword