Skip to content
Snippets Groups Projects
Commit 1863b0d5 authored by 석찬 윤's avatar 석찬 윤
Browse files

feat: 마이페이지 의존성 배열 수정

parent a642d9fb
No related branches found
No related tags found
1 merge request!38fix: 마이페이지 친구 삭제 오류 수정 및 API호출 의존성 배열 수정
Pipeline #10977 passed
...@@ -90,7 +90,7 @@ const MyPage = () => { ...@@ -90,7 +90,7 @@ const MyPage = () => {
} }
}; };
if (activeTab === "friends") fetchSentRequests(); if (activeTab === "friends") fetchSentRequests();
}, [activeTab]); }, [activeTab, sentRequests]);
// 받은 친구 요청 조회 // 받은 친구 요청 조회
useEffect(() => { useEffect(() => {
...@@ -104,7 +104,7 @@ const MyPage = () => { ...@@ -104,7 +104,7 @@ const MyPage = () => {
} }
}; };
if (activeTab === "friends") fetchReceivedRequests(); if (activeTab === "friends") fetchReceivedRequests();
}, [activeTab]); }, [activeTab, receivedRequests]);
// 친구 목록 무한스크롤 처리 // 친구 목록 무한스크롤 처리
useEffect(() => { useEffect(() => {
...@@ -133,7 +133,7 @@ const MyPage = () => { ...@@ -133,7 +133,7 @@ const MyPage = () => {
if (activeTab === "friends") fetchFriends(); if (activeTab === "friends") fetchFriends();
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [page, hasNext, activeTab, isLoading]); }, [page, hasNext, activeTab, isLoading, friends]);
// 친구 요청 보내기 // 친구 요청 보내기
const handleSendRequest = async () => { const handleSendRequest = async () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment