From 3b57244f792214441941c078f588244501d4d179 Mon Sep 17 00:00:00 2001 From: twoimo <32544727+twoimo@users.noreply.github.com> Date: Tue, 22 Sep 2026 23:08:19 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A7=80=EB=8F=84=20=EB=A7=88=EC=BB=A4?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=ED=95=A8=EC=88=98=EB=A5=BC=20=ED=9A=A8?= =?UTF-8?q?=EA=B3=BC=20=EC=9D=98=EC=A1=B4=EC=84=B1=EC=97=90=20=ED=8F=AC?= =?UTF-8?q?=ED=95=A8=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 렌더마다 함수가 바뀌지 않게 묶어, 마커 갱신 시점은 기존 데이터 변경과 같다. Co-authored-by: Cursor --- apps/web/components/map/NaverMapView.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/components/map/NaverMapView.tsx b/apps/web/components/map/NaverMapView.tsx index f1a74787a4..c8a92604ba 100644 --- a/apps/web/components/map/NaverMapView.tsx +++ b/apps/web/components/map/NaverMapView.tsx @@ -2039,13 +2039,13 @@ const NaverMapView = memo(({ ); return expandedClusterRetainIds.length; }, [expandedClusterRetainIds, mergedRestaurantById, restaurantById]); - const resolveMarkerRestaurant = (restaurantId: string | null | undefined) => resolveExpandedClusterRestaurant( + const resolveMarkerRestaurant = useCallback((restaurantId: string | null | undefined) => resolveExpandedClusterRestaurant( restaurantId, restaurantById, mergedRestaurantById, expandedClusterRestaurantSnapshotRef.current, expandedClusterRestaurantIds.length > 0, - ); + ), [expandedClusterRestaurantIds, mergedRestaurantById, restaurantById]); const restaurantsForSwipe = useMemo(() => buildRestaurantsForSwipe({ activeSearchedRestaurant: markerVisibleActiveSearchedRestaurant, selectedRestaurant: markerVisibleSelectedRestaurant, @@ -2838,7 +2838,7 @@ const NaverMapView = memo(({ } } - }, [clusters, regionalClusters, seoulDistrictClusters, seoulDistrictClustersFiltered, seoulIndividualIds, activeSearchedRestaurant, displayRestaurants, displayRestaurantIds, expandedClusterRestaurantIds, markerKindSignature, markerRenderRetryTick, markerVisibleActiveSearchedRestaurant, markerVisibleSelectedRestaurant, restaurantById, mergedRestaurantById, restaurantsForSwipe, selectedRegion, selectedRestaurant, showUserSubmittedMarkers, isClusterMode, isRegionalClusterMode, isSeoulDistrictMode, isMapInitialized, isMobileOrTablet, visibleMarkerReviewBubbles, activateNoncriticalMapEffects, fitIslandClusterViewport, jumpWithPanelOffset, onMarkerClick, onRestaurantSelect, onVisibleRestaurantsChange, onContextualRestaurantsChange, handleMarkerRestaurantSelection, resetMarkerRenderRetry, scheduleMarkerRenderRetry]); + }, [clusters, regionalClusters, seoulDistrictClusters, seoulDistrictClustersFiltered, seoulIndividualIds, activeSearchedRestaurant, displayRestaurants, displayRestaurantIds, expandedClusterRestaurantIds, markerKindSignature, markerRenderRetryTick, markerVisibleActiveSearchedRestaurant, markerVisibleSelectedRestaurant, restaurantById, mergedRestaurantById, restaurantsForSwipe, selectedRegion, selectedRestaurant, showUserSubmittedMarkers, isClusterMode, isRegionalClusterMode, isSeoulDistrictMode, isMapInitialized, isMobileOrTablet, visibleMarkerReviewBubbles, activateNoncriticalMapEffects, fitIslandClusterViewport, jumpWithPanelOffset, onMarkerClick, onRestaurantSelect, onVisibleRestaurantsChange, onContextualRestaurantsChange, handleMarkerRestaurantSelection, resetMarkerRenderRetry, scheduleMarkerRenderRetry, resolveMarkerRestaurant]); // [Animation] 카테고리 이모지 순환 업데이트 useEffect(() => { @@ -2984,7 +2984,7 @@ const NaverMapView = memo(({ prevSelectedMarkerIdRef.current = styleUpdatePlan.nextPreviousSelectedId; prevSelectedRestaurantIdRef.current = styleUpdatePlan.nextPreviousSelectedId; - }, [selectedRestaurant, gridSelectedRestaurant, isGridMode, displayRestaurants, restaurantById, mergedRestaurantById, expandedClusterRestaurantIds, visibleMarkerReviewBubbles, isMobileOrTablet]); + }, [selectedRestaurant, gridSelectedRestaurant, isGridMode, displayRestaurants, restaurantById, mergedRestaurantById, expandedClusterRestaurantIds, visibleMarkerReviewBubbles, isMobileOrTablet, resolveMarkerRestaurant]); // selectedRestaurant이 기존 데이터와 다른 경우 기존 데이터로 교체