Closed tentsundue closed 5 months ago
Yoooo Tenzin! Thank you, but I did notice something that would be very helpful in making this file more readable. Could you please add comments to all the functions/variables similar to the Map.jsx?
Hey Nwin, my fault for not adding some earlier but I just pushed new changes with comments for each function and variable I added. Let me know if you need them to be more descriptive, technical, etc.
InfoModal.jsx
Callback Functions Added
handleClose
replaced previous callback function foronClose
prop in Modal componenthandleShowEmail
replaced previous callback function foronClick
prop inViewContactButton
handleShare
replaced previous callback function foronClick
prop in the Share Button componentTernary Operators Moved and Their Variables
ownerTag
represents the blue owner tag for a given itemlostTag
represents the red lost tag for a given itemfoundTag
represents the green found tag for a given itemlostDateText
represents the date at which a given item was lostfoundDateText
represents the date at which a given item was foundviewContactButton
represents the blue "View Contact" buttonshowContactButton
represents the button shown after clicking the "View Contact" button, contains contact infoAxios.Delete Moved
I was able to move
axios.delete
fromhandleDelete
intoutils/ApiUtils.js
LoginModal.jsx
Callback Functions Added
handleSignInGoogle
replaced previous callback function foronClick
prop in the Sign In Button componentTernary Operators Moved and Their Variables
signInErrorAlert
represents the red "Can't sign in?" Alert boxwelcomeMessage
represents the welcome text shown on the interfaceSmall Note
For
LoginModal.jsx
, thehandleSignInGoogle
function had to utilizesignInGoogle
within it's dependency list, otherwise there could be a risk of performance issues in the future. However, in order for that to happen, I had to wrapsignInGoogle
in its own useCallback() hook and commented out the original function for now.