Skip to content

Commit

Permalink
Merge pull request #573 from arc53/bug/update-and-delete
Browse files Browse the repository at this point in the history
fix update and delete bug
  • Loading branch information
dartpain authored Oct 11, 2023
2 parents 344692f + c969e9c commit 771950f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions frontend/src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
method: 'POST',
})
.then(() => {
// remove the image element from the DOM
const imageElement = document.querySelector(
`#img-${id}`,
) as HTMLElement;
const parentElement = imageElement.parentNode as HTMLElement;
parentElement.parentNode?.removeChild(parentElement);
fetchConversations();
})
.catch((error) => console.error(error));
Expand Down Expand Up @@ -239,9 +233,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
</NavLink>
<div className="conversations-container max-h-[25rem] overflow-y-auto">
{conversations
? conversations.map((conversation, index) => (
? conversations.map((conversation) => (
<ConversationTile
key={index}
key={conversation.id}
conversation={conversation}
selectConversation={(id) => handleConversationClick(id)}
onDeleteConversation={(id) => handleDeleteConversation(id)}
Expand Down

2 comments on commit 771950f

@vercel
Copy link

@vercel vercel bot commented on 771950f Oct 11, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nextra-docsgpt – ./docs

nextra-docsgpt.vercel.app
nextra-docsgpt-arc53.vercel.app
nextra-docsgpt-git-main-arc53.vercel.app
docs.docsgpt.co.uk

@vercel
Copy link

@vercel vercel bot commented on 771950f Oct 11, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

docs-gpt – ./frontend

docs-gpt-git-main-arc53.vercel.app
docs-gpt-arc53.vercel.app
docs-gpt-brown.vercel.app

Please sign in to comment.