icssc / zotnfound-frontend

ZotNFound.com
2 stars 1 forks source link

Refactored InfoModal.jsx and LoginModal.jsx #12

Closed tentsundue closed 5 months ago

tentsundue commented 6 months ago

InfoModal.jsx

Callback Functions Added

Ternary Operators Moved and Their Variables

Axios.Delete Moved

I was able to move axios.delete from handleDelete into utils/ApiUtils.js

LoginModal.jsx

Callback Functions Added

Ternary Operators Moved and Their Variables

Small Note

For LoginModal.jsx, the handleSignInGoogle function had to utilize signInGoogle 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 wrap signInGoogle in its own useCallback() hook and commented out the original function for now.

NwinNwin commented 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?

tentsundue commented 5 months ago

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.