diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/components/ProfileModules/index.tsx b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/components/ProfileModules/index.tsx index f354c3b3..58bb50fe 100644 --- a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/components/ProfileModules/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/components/ProfileModules/index.tsx @@ -32,10 +32,9 @@ import { FriendSelectionItem } from "@/components/FriendSelection/data"; import styles from "./Person.module.scss"; interface PersonProps { contract: ContractData | weChatGroup; - onToggleProfile?: () => void; } -const Person: React.FC = ({ contract, onToggleProfile }) => { +const Person: React.FC = ({ contract }) => { const [messageApi, contextHolder] = message.useMessage(); const [isEditingRemark, setIsEditingRemark] = useState(false); const [remarkValue, setRemarkValue] = useState(contract.conRemark || ""); @@ -504,10 +503,6 @@ const Person: React.FC = ({ contract, onToggleProfile }) => { chatroomOperateType: 4, // 4 for quit }); messageApi.success("已退出群聊"); - // 可能还需要一个回调来关闭侧边栏或切换到另一个聊天 - if (onToggleProfile) { - onToggleProfile(); - } }, }); }; diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx index 56e2ccf3..e52479a3 100644 --- a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx @@ -11,10 +11,9 @@ const { Sider } = Layout; interface PersonProps { contract: ContractData | weChatGroup; - onToggleProfile?: () => void; } -const Person: React.FC = ({ contract, onToggleProfile }) => { +const Person: React.FC = ({ contract }) => { const [activeKey, setActiveKey] = useState("profile"); const isGroup = "chatroomId" in contract; console.log(contract); @@ -50,12 +49,7 @@ const Person: React.FC = ({ contract, onToggleProfile }) => { /> } > - {activeKey === "profile" && ( - - )} + {activeKey === "profile" && } {activeKey === "quickwords" && ( = ({ contract }) => { )} - @@ -127,11 +123,9 @@ const ChatWindow: React.FC = ({ contract }) => { {/* 右侧个人资料卡片 */} - + {showProfile && ( + + )} ); };