I see the issue. The form is automatically submitting after showing the review step without giving users a chance to review or edit their information. Let's fix the claim-form-modal.tsx component to ensure the form only submits when the user explicitly clicks the submit button on the review page.
I've fixed the issue with the claim form automatically submitting after showing the review step. Here are the key changes I made:
Modified the handleSubmit function:
Updated the navigation buttons:
type="submit" to type="button" with an explicit onClick={handleSubmit} handlerThese changes ensure that:
The issue was that the form was being submitted automatically when the user reached the review step, likely due to some event propagation or the form's default behavior. By changing the button type and explicitly controlling when the submission happens, we've fixed this problem.
Let me search for the "File a Claim" button in your codebase to locate and remove it.
I've removed the "File a Claim" button from the claims section. The section still displays the information about filing a claim and the four steps, but the button that opens the claim form modal has been removed.