Skip to content

Commit e860a15

Browse files
authored
Fix room reservation stuck on submitting bug (#344)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * After submitting a room request, you are now redirected to the newly created request's detail page instead of the list view for a more seamless experience. * Removed the success notification message that previously appeared after submission. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent c697304 commit e860a15

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/ui/pages/roomRequest/NewRoomRequest.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,7 @@ const NewRoomRequest: React.FC<NewRoomRequestProps> = ({
349349
return;
350350
}
351351
const response = await createRoomRequest(values);
352-
await navigate("/roomRequests");
353-
notifications.show({
354-
title: "Room Request Submitted",
355-
message: `The request ID is ${response.id}.`,
356-
});
352+
navigate(`/roomRequests/${values.semester}/${response.id}`);
357353
} catch (e) {
358354
notifications.show({
359355
color: "red",

0 commit comments

Comments
 (0)