I am in the process of creating a user-friendly "My Account" page using react, where users can easily update their account information. I have divided my components into two sections: the navbar and the form itself. However, I am facing an issue with the submit button for the form being located in the navbar component, while the actual form is within the accountdetails component. Both components share a common parent component (App.js). How can I make the edit button in the top right corner of the screen function as a submit button for the form, ensuring that all form validations are met to prevent users from submitting incorrect data?
You can access the corresponding code here: https://github.com/bazuka1995/LeapDev-User-Account