From fd4aae5a1bac688df4c36d2f32dd5fb49d0b9c01 Mon Sep 17 00:00:00 2001 From: HanJul_01 <129282275+Hanjuri@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:35:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=EC=B1=84=ED=8C=85=EB=B0=A9=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/PeopleListPage/PeopleListPage.jsx | 10 +++++----- src/pages/chat/ChatMain.jsx | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pages/PeopleListPage/PeopleListPage.jsx b/src/pages/PeopleListPage/PeopleListPage.jsx index ceffa12..bb992e2 100644 --- a/src/pages/PeopleListPage/PeopleListPage.jsx +++ b/src/pages/PeopleListPage/PeopleListPage.jsx @@ -3,8 +3,8 @@ import { useNavigate } from "react-router-dom"; import Layout from "../../components/Common/Layout.jsx"; import MiniLayout from "../../components/Common/miniLayout.jsx"; import PeopleCard from "../../components/PeopleListComponents/PeopleCard/peopleCard.jsx"; -import fetchMembersList from "../../services/fetchMembersList.js"; -import dummyImages1 from "../../assets/dummyImages/peopleList.jpeg" +import { PeopleListCall } from "../../api/PeopleListCall.js"; // PeopleListCall 불러오기 +import dummyImages1 from "../../assets/dummyImages/peopleList.jpeg"; export const PeopleListPage = () => { const navigate = useNavigate(); @@ -16,7 +16,8 @@ export const PeopleListPage = () => { const displayMembers = async () => { setIsLoading(true); try { - const membersData = await fetchMembersList(); + // fetchMembersList 대신 PeopleListCall 사용 + const membersData = await PeopleListCall(); console.log('Fetched Members:', membersData.data); // 데이터 구조를 확인하기 위해 콘솔에 출력 if (membersData && membersData.data && membersData.data.memberList) { setMembers(membersData.data.memberList); @@ -34,7 +35,6 @@ export const PeopleListPage = () => { displayMembers(); }, []); -; const handleCardClick = () => { navigate('/details'); @@ -58,4 +58,4 @@ export const PeopleListPage = () => { ); -}; +}; \ No newline at end of file diff --git a/src/pages/chat/ChatMain.jsx b/src/pages/chat/ChatMain.jsx index 992ee5e..66076d3 100644 --- a/src/pages/chat/ChatMain.jsx +++ b/src/pages/chat/ChatMain.jsx @@ -15,6 +15,7 @@ function ChatMain() { useEffect(() => { + console.log(nowUser,'현재 사용자') const fetchChatList = async () => { try { const response = await getChatList(nowUser);