diff --git a/src/pages/ChatLogs/components/ChatVote.tsx b/src/pages/ChatLogs/components/ChatVote.tsx index bfb98e6..53408c4 100644 --- a/src/pages/ChatLogs/components/ChatVote.tsx +++ b/src/pages/ChatLogs/components/ChatVote.tsx @@ -36,9 +36,7 @@ export const ChatVote: React.FC = (props) => {
{msg?.voteitem[item]}
- ) : ( - <> - ); + ) : null; }) : null} diff --git a/src/pages/ChatLogs/index.tsx b/src/pages/ChatLogs/index.tsx index bb813b2..8a5c07a 100644 --- a/src/pages/ChatLogs/index.tsx +++ b/src/pages/ChatLogs/index.tsx @@ -343,105 +343,6 @@ const ChatLogs: React.FC = () => { return 0; }; - // const { notification } = App.useApp(); - const tabContent = () => { - if (tabKey == '0') { - // 内部联系人 - return ( - - {innerStaffsList.length - ? innerStaffsList.map((item) => { - if (item.user_id == selectStaff?.user_id) { - return null; - } - return ( -
{ - tabKeyRef.current = tabKey; - - setSelectCustFollow(undefined); - selectCustFollowRef.current = undefined; - setSelectGroup(undefined); - selectGroupRef.current = undefined; - - setSelectInnerStaff(item); - selectInnerStaffRef.current = item; - page(1); - }} - style={{ display: item.name.includes(searchWord['0']) ? '' : 'none' }} - > -
- {item.avatar ? ( - - ) : ( - <>{item.name[0]} - )} -
-
-
- {item.name} -
-
-
- ); - }) - : null} -
- {checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''} -
-
- ); - } else if (tabKey == '1') { - return ( - - {custFollowsList.length - ? custFollowsList.map((item, i) => { - return item.state == 0 ? null : custFollowsListItem(item, i); - }) - : null} -
- {checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''} -
-
- ); - } else { - return ( - - { - tabKeyRef.current = tabKey; - setSelectCustFollow(undefined); - selectCustFollowRef.current = undefined; - setSelectInnerStaff(undefined); - selectInnerStaffRef.current = undefined; - setSelectGroup(item); - selectGroupRef.current = item; - selectGroupRef.current.adminUserIDs = getAdminList(item.admin_list); - getGroupMembersList(); - }} - selectGroup={selectGroup} - /> - - ); - } - }; - // 删除的联系人/群 const tabContentDel = () => { if (tabKey == '0') { @@ -479,6 +380,108 @@ const ChatLogs: React.FC = () => { } }; + // const { notification } = App.useApp(); + const tabContent = () => { + //
{tabContent()}
+ + return ( + <> + {/* 内部联系人 */} +
+ + {innerStaffsList.length + ? innerStaffsList.map((item) => { + if (item.user_id == selectStaff?.user_id) { + return null; + } + return ( +
{ + tabKeyRef.current = tabKey; + + setSelectCustFollow(undefined); + selectCustFollowRef.current = undefined; + setSelectGroup(undefined); + selectGroupRef.current = undefined; + + setSelectInnerStaff(item); + selectInnerStaffRef.current = item; + page(1); + }} + style={{ display: item.name.includes(searchWord['0']) ? '' : 'none' }} + > +
+ {item.avatar ? ( + + ) : ( + <>{item.name[0]} + )} +
+
+
+ {item.name} +
+
+
+ ); + }) + : null} +
+ {checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''} +
+
+
+
+ + {custFollowsList.length + ? custFollowsList.map((item, i) => { + return item.state == 0 ? null : custFollowsListItem(item, i); + }) + : null} +
+ {checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''} +
+
+
+ {tabContentDel()} +
+ + { + tabKeyRef.current = tabKey; + setSelectCustFollow(undefined); + selectCustFollowRef.current = undefined; + setSelectInnerStaff(undefined); + selectInnerStaffRef.current = undefined; + setSelectGroup(item); + selectGroupRef.current = item; + selectGroupRef.current.adminUserIDs = getAdminList(item.admin_list); + getGroupMembersList(); + }} + selectGroup={selectGroup} + /> + +
+ + ); + }; + return (
@@ -610,8 +613,7 @@ const ChatLogs: React.FC = () => { // } }} /> -
{tabContent()}
- {tabContentDel()} + {tabContent()}