Currently working on a website project where I have split the layout into two equal halves using display grid. On the right side, there is a form that, once submitted, should display a confirmation or error message. I am using Next.js for this project. How can I make the form disappear and show the message?
I was considering using display none, but I'm wondering if there might be a better method, such as utilizing components. Any suggestions would be appreciated. Thank you.