Multiple Rooms Created When Clicking Submit Button Multiple Times
🐛 Describe the bug
Description: When clicking the tick button (✔️) at the bottom center to create a new room, multiple rooms are created if the button is clicked multiple times. This should not happen. Instead, after clicking the button: 1. The user should be redirected to the homepage where they can view the newly created room. 2. The button should be disabled after the first click to prevent multiple room creations.
Expected Behavior: • When the user clicks the tick button once, only one room should be created. • The user should be redirected to the homepage where they can see the created room. • Further clicks should not create additional rooms.
Steps to Reproduce: 1. Open the Create New Room page. 2. Fill in the necessary details. 3. Click the tick button multiple times. 4. Observe that multiple rooms are created instead of just one.
Possible Fix: • Implement a loading state or disable the button immediately after the first click. • Redirect the user to the homepage after successfully creating the room. • Ensure only one API request is sent per room creation.
@Aarush-Acharya @chandansgowda please assign this to me