Skip to content

Conversation

scottybollinger
Copy link

The current code is filtering based on id (from useParams() at the top), which is the ID of the chat currently being viewed in the URL, not the one being deleted.

The code now correctly filters out the chat with the deleteId rather than the current URL id.

This ensures that:

  1. The correct chat is removed from the history list after deletion
  2. The filter operation matches the chat being deleted rather than the currently viewed chat
  3. The UI will update properly to reflect the deleted item

The current code is filtering based on id (from useParams() at the top), which is the ID of the chat currently being viewed in the URL, not the one being deleted.

The code now correctly filters out the chat with the deleteId rather than the current URL id.

This ensures that:
1. The correct chat is removed from the history list after deletion
2. The filter operation matches the chat being deleted rather than the currently viewed chat
3. The UI will update properly to reflect the deleted item
Copy link

vercel bot commented May 20, 2025

@scottybollinger is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant