From f6380cf5519c743c044a0cbf8637a671b934d940 Mon Sep 17 00:00:00 2001 From: "SK\\ssssk" Date: Sun, 22 Sep 2024 22:55:24 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20useEffect=20=ED=95=9C=EB=B2=88=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=20=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0,?= =?UTF-8?q?=20=EC=84=9C=EB=B2=84=EC=97=90=EC=84=9C=20=EB=AC=B4=ED=95=9C=20?= =?UTF-8?q?=EB=A1=9C=EB=94=A9=20=EB=B0=9C=EC=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gathering/read/GatheringCardListContainer.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/containers/gathering/read/GatheringCardListContainer.tsx b/src/containers/gathering/read/GatheringCardListContainer.tsx index ca8fd207..f80d0f7c 100644 --- a/src/containers/gathering/read/GatheringCardListContainer.tsx +++ b/src/containers/gathering/read/GatheringCardListContainer.tsx @@ -9,7 +9,7 @@ import useModalState from "@/hooks/useModalState"; import useAuthStore from "@/store/authStore"; import { Gathering } from "@/types/GatheringDto"; import { useRouter, useSearchParams } from "next/navigation"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useState } from "react"; const SkeletonGatheringList = () => { return ( @@ -29,7 +29,6 @@ const GatheringCardListContainer = () => { const authStore = useAuthStore(); const router = useRouter(); const modalState = useModalState(); - const initRef = useRef(true); const [currentPage, setCurrentPage] = useState( searchParams.get("page") ? Number(searchParams.get("page")) : 1, ); @@ -56,10 +55,6 @@ const GatheringCardListContainer = () => { }; useEffect(() => { - if (initRef.current) { - initRef.current = false; - return; - } const temp = async () => { try { const url = new URL(window.location.href);