campus-space
campus-space copied to clipboard
feat: Edit rooms
Issue
resolves #32
Description :
Implementation of modal form for updating the room information.
Video :
https://github.com/sethshivam11/campus-space/assets/101277141/c709d852-1332-4fdc-8f23-0ff6febac85b
@sethshivam11 Please review!! Let me know if any changes required!!
@Sid-80 Please fix the gap between the cancel and submit button.
@sethshivam11 Changes are up. Please review it!!
@sethshivam11 ?
@Sid-80 Okk, I am checking it.
@Sid-80 RoomProvider.tsx file -
- Instead of checking the res.status === 200, you should use res.data.success for the sake of consistency .
- Use the spread operator and try to update the specific room, instead of just running the fetchRoom function in if block.
EditTeamModal.tsx file -
- Use Dialog box instead of an AlertDialog (Because the UI is breaking).
- Buttons having text should be wrapped inside of a DialogFooter (if you use Dialog).
- Buttons having text Submit should have "Update".
EditTeamForm.tsx file -
- Since I haven't used zod or react-hook-form you should remove it, in order to maintain consistency and save the space (for a single feature you have added 2-3 packages).
I hope you'll understand and keep the codebase maintained for the others as well.
@Sid-80 Are you working on it?