Hey there, back again with a head-scratcher I've been dealing with all day.
Almost done with a contact form, just stuck on an animation concept that involves three steps:
1. Prompting the user to contact
2. Making the waiting process user-friendly with a small loader
3. Displaying either a success message or an error message after form submission
My idea to achieve this involves using three different icons/loaders stacked on top of each other, toggling their visibility with UseState based on the step.
I can currently hide the initial icon as soon as the submit button is clicked, but struggling to show the loader during the API response and the final icon at the end.
Any suggestions on a different approach I should take?
(Code snippet provided with styled components, form handling, and icon loaders)
Appreciate the help as always!