From 9c40d9bba8a3e91cdf6dedc43d233e4c9eb07129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=9D=80=EC=B1=84?= Date: Tue, 10 Sep 2024 17:36:58 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=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 --- .env | 2 +- src/pages/PeopleListPage/PeopleListPage.jsx | 93 +++++++++++++++++---- 2 files changed, 79 insertions(+), 16 deletions(-) diff --git a/.env b/.env index 729fbeb..b7f4ad8 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -VITE_BASE_URL = https://api.kaboo.site:8081 +VITE_BASE_URL = https://api.kaboo.site:8081 \ No newline at end of file diff --git a/src/pages/PeopleListPage/PeopleListPage.jsx b/src/pages/PeopleListPage/PeopleListPage.jsx index ceffa12..c3851b1 100644 --- a/src/pages/PeopleListPage/PeopleListPage.jsx +++ b/src/pages/PeopleListPage/PeopleListPage.jsx @@ -17,12 +17,12 @@ export const PeopleListPage = () => { setIsLoading(true); try { const membersData = await fetchMembersList(); - console.log('Fetched Members:', membersData.data); // 데이터 구조를 확인하기 위해 콘솔에 출력 + console.log('Fetched Members:', membersData.data); if (membersData && membersData.data && membersData.data.memberList) { setMembers(membersData.data.memberList); } else { console.error('Invalid data structure:', membersData); - setMembers([]); // 데이터 구조가 올바르지 않을 경우 빈 배열 설정 + setMembers([]); } setIsLoading(false); } catch (error) { @@ -32,29 +32,92 @@ export const PeopleListPage = () => { } }; - displayMembers(); + //displayMembers(); }, []); -; + ; const handleCardClick = () => { navigate('/details'); }; - if (isLoading) return
로딩 중...
; - if (error) return
에러 발생: {error.message}
; + // if (isLoading) return
로딩 중...
; + // if (error) return
에러 발생: {error.message}
; return ( - {members.map((member, index) => ( - - ))} + + + + + + + + + + + + );