mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(frontend): Prevent push message from being rendered twice (#5546)
This commit is contained in:
parent
ac5190c283
commit
37c46f1ed8
@ -1,9 +1,7 @@
|
||||
import React from "react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import toast from "react-hot-toast";
|
||||
import posthog from "posthog-js";
|
||||
import EllipsisH from "#/icons/ellipsis-h.svg?react";
|
||||
import { addUserMessage } from "#/state/chat-slice";
|
||||
import { createChatMessage } from "#/services/chat-service";
|
||||
import { ProjectMenuCardContextMenu } from "./project.menu-card-context-menu";
|
||||
import { ProjectMenuDetailsPlaceholder } from "./project-menu-details-placeholder";
|
||||
@ -28,7 +26,6 @@ export function ProjectMenuCard({
|
||||
githubData,
|
||||
}: ProjectMenuCardProps) {
|
||||
const { send } = useWsClient();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const [contextMenuIsOpen, setContextMenuIsOpen] = React.useState(false);
|
||||
const [connectToGitHubModalOpen, setConnectToGitHubModalOpen] =
|
||||
@ -56,7 +53,6 @@ Please push the changes to GitHub and open a pull request.
|
||||
);
|
||||
|
||||
send(event); // send to socket
|
||||
dispatch(addUserMessage(rawEvent)); // display in chat interface
|
||||
setContextMenuIsOpen(false);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user