Skip to content

Commit

Permalink
[test]: chatRooms
Browse files Browse the repository at this point in the history
  • Loading branch information
VictoryJu committed Aug 29, 2024
1 parent e9cf9de commit 6783abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/hooks/api/useChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const useChatRooms = () => {
const res = fetchChatRooms();
return res;
},
initialData: [],
enabled: !!token,
});
};
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Chat/ChatRooms/ChatRooms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ChatRooms = () => {

return (
<>
{isEdit ? (
{isEdit && chatRoomDatas ? (
<ChatRoomsEdit chatData={chatRoomDatas} setIsEdit={setIsEdit} />
) : (
<div className={styles.ChatRoomsWrapper}>
Expand All @@ -36,6 +36,7 @@ const ChatRooms = () => {
onClick={handleEditIcon}
/>
</div>
{chatRoomDatas && <div>{chatRoomDatas[0].tsid}</div>}
{chatRoomDatas &&
chatRoomDatas.map((chatInfo) => (
<ChatItemBase key={chatInfo.chatRoomId}>
Expand Down

0 comments on commit 6783abd

Please sign in to comment.