Skip to content

Edit button pushes to database, but it doesn't fully prefill#128

Open
Nogunmesa wants to merge 2 commits intodevelopmentfrom
feat/editcalendar
Open

Edit button pushes to database, but it doesn't fully prefill#128
Nogunmesa wants to merge 2 commits intodevelopmentfrom
feat/editcalendar

Conversation

@Nogunmesa
Copy link
Copy Markdown
Collaborator

Edit button make changes to database, but it doesn't fully prefill with original event data

// Update the event in the local state
setAllEvents(
allEvents.map((event) =>
event.id === newEvent.id ? { ...event, ...newEvent } : event
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating edited event

<button
type="button"
className="inline-flex w-full justify-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 sm:ml-3 sm:w-auto"
onClick={() => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented edit button

Copy link
Copy Markdown
Collaborator

@trappaly trappaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tested on my computer the edit event wouldn't update, but maybe have other classmates test it out as well. I think we determined that it worked for already existing events, but not newly created events

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.

2 participants