Hookup update links endpoint #27
Merged
q63xu
merged 0 commits from chore/update-links
into main
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'chore/update-links'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Add submit and cancel buttons for updating links @l42luo feel free to take a look to see how links are being updated!
@a3thakra I combined both
LoggedInState
andLoggedOutState
intoAuthState
even though it makes sense to only expose login/logout functionality when appropriate, conditionally rendering context values makes it confusing imo and hard to work with 😅@a3thakra I got rid of
loggedIn
as a separate state variable and made it dependent onheaders
so we don't have to worry about updating two similar state variables everytime@a258wang I combined all ur components into one, I really liked the approach you were taking by breaking things down into separate component, including the separation between
LoginHead
andLoginBox
and identifying howLoginHead
won't have to be re-rendered when the state inLoginBox
changes!But making components too fragmented can reduce readability, for example there was a
LoginScreen
component inpages/editor.tsx
which is a purely presentational component that should only live with otherLogin
subcomponents. Also, with fragmenting components you would have the overhead of naming components such asLogin{Head/Box/screen}
this might also make it confusing to trace for othersOverall really good job on identify when u should break components up, just giving you a heads up since a lot of frontend codebases out there heavily values readability over minor performance benefits
Revalidates the page every 60s using ISR https://blog.logrocket.com/incremental-static-regeneration-with-next-js/
Remove unused tailwind styles
@a3thakra changed to fetching from an endpoint rather than a
links.json
file!Use an environment variable instead. Something like API_HOST=http://localhost:5000
changed this line in version 2 of the diff
added 1 commit
Compare with previous version
added 2 commits
c17dff17
- 1 commit from branchmain
Compare with previous version