Goal: US15TL; DR: Existing entries can now be editted through the Entry form which can be accessed through Edit entry button which can be found in the entry view page.
+ Add PenIcon svg
! Update components/svgs/index.js
# Exports the new svg.
+ Add EditEntryButton component
# Basically almost the same as the NewEntryButton component.
! Update BackButton component
# Now behaves diffently when called with editMode.
! Update entry.js api page
# Handles the PATCH method for updating an entry by id.
! Update NewEntryForm component
# Renamed to EntryForm.
# Adapted to now behave diffently when it
# receives the editEntryData through props:
# Fills all input fields with the received data.
# Submit button styling and Icon changes.
# Submitting makes a PATCH instead of POST request.
! Update new-entry.js page
# Updated import name of the previously NewEntryForm component.
! Update EntryDetails component
# Now uses EditEntryButton component.
# Now uses EntryForm component.
! Update [entryId].js page
# Uses the editMode and setEditMode state variable.
# Passes new props to BackButton and EntryDetails components
Please take a moment to review this ❤️ 😊
Goal: US15 TL; DR: Existing entries can now be editted through the
Entry form
which can be accessed throughEdit entry button
which can be found in the entry view page.Deployment