Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor createmodal.jsx and lostfoundswitch.jsx #16

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

sharonm6
Copy link
Contributor

@sharonm6 sharonm6 commented Jan 5, 2024

Refactor CreateModal.jsx

  • Move any useState and variables definition to the top of React component
  • Move ternary operations (listItemButton, cancelListItemButton, loadingAnimation, uploadedImage, backModalButton, cancelModalButton, continueModalButton, submitModalButton)
  • Identify & create functions for callback functions (handleListItemButtonClick, handleStepIncrement, handleStepDecrement, handleItemDateChange, handleItemNameChange, handleItemDescriptionChange, handleItemImageChange)

Refactor LostFoundSwitch.jsx

  • Move ternary operations (lostButton, foundButton)
  • Identify & create functions for callback functions (handleStatusToggle)

Closes #1

@sharonm6 sharonm6 linked an issue Jan 5, 2024 that may be closed by this pull request
@NwinNwin NwinNwin merged commit 2a81dd2 into main Jan 10, 2024
1 check passed
@stevem-zhou
Copy link
Collaborator

LGTM

@stevem-zhou
Copy link
Collaborator

Thanks for adding all the comments around the code! It's a lot more readable now!!

@sharonm6 sharonm6 deleted the 1-refactor-createmodal-lostfoundswitch branch January 13, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor CreateModal.jsx and LostFoundSwitch.jsx
3 participants