Skip to content

Commit

Permalink
fix: fixed zipcode not cleared after refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
pnboliveira committed Apr 28, 2024
1 parent fdbe097 commit 5951f97
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/extensions/components/registration/Registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,11 @@ export const Registration = () => {

const onPrevClick = useCallback(() => {
if (stepData.zipcode) {
stepData.zipcode = '';
registrationData.zipcode = '';
}
updateRegistrationData(stepData);
setStepData({});
history.push(prevStepUrl);
}, [updateRegistrationData, stepData, history, prevStepUrl]);
}, [registrationData, stepData, history, prevStepUrl]);

const handleSubmit = useCallback(
(e: FormEvent<HTMLFormElement>) => {
Expand Down

0 comments on commit 5951f97

Please sign in to comment.