From d8109d36e163ebd924216045ce8e3c51e26c8427 Mon Sep 17 00:00:00 2001 From: soo yeon <80268199+sypaik-dev@users.noreply.github.com> Date: Tue, 28 Nov 2023 23:59:05 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20params=EC=97=90=EC=84=9C?= =?UTF-8?q?=20accountname=EC=9D=84=20=EA=B0=80=EC=A0=B8=EC=98=A4=EC=A7=80?= =?UTF-8?q?=20=EB=AA=BB=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FollowListPage/FollowerListPage/FollowerListPage.jsx | 6 +++--- .../FollowListPage/FollowingListPage/FollowingListPage.jsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/FollowListPage/FollowerListPage/FollowerListPage.jsx b/src/pages/FollowListPage/FollowerListPage/FollowerListPage.jsx index 8305571..5b1bedc 100644 --- a/src/pages/FollowListPage/FollowerListPage/FollowerListPage.jsx +++ b/src/pages/FollowListPage/FollowerListPage/FollowerListPage.jsx @@ -20,19 +20,19 @@ import { } from './FollowerListPageStyle'; const FollowerListPage = () => { - const account = useParams().id; + const { accountname: accountName } = useParams(); const isDarkMode = useRecoilValue(isDarkModeState); const [isLoading, setIsLoading] = useState(true); const [followings, setFollowings] = useState([]); useEffect(() => { const followList = async () => { - const data = await getFollowerList(account); + const data = await getFollowerList(accountName); setFollowings(data); setIsLoading(false); }; followList(); - }, [account]); + }, [accountName]); return ( <> diff --git a/src/pages/FollowListPage/FollowingListPage/FollowingListPage.jsx b/src/pages/FollowListPage/FollowingListPage/FollowingListPage.jsx index e30476d..349f732 100644 --- a/src/pages/FollowListPage/FollowingListPage/FollowingListPage.jsx +++ b/src/pages/FollowListPage/FollowingListPage/FollowingListPage.jsx @@ -21,7 +21,7 @@ import { const FollowingListPage = () => { - const account = useParams().id; + const { accountname: accountName } = useParams(); const isDarkMode = useRecoilValue(isDarkModeState); const token = localStorage.getItem('token'); const [isLoading, setIsLoading] = useState(true); @@ -29,12 +29,12 @@ const FollowingListPage = () => { useEffect(() => { const followList = async () => { - const data = await getFollowingList(account); + const data = await getFollowingList(accountName); setFollowings(data); setIsLoading(false); }; followList(); - }, [account, token]); + }, [accountName, token]); return ( <>