From 3336ee9bc3490dee6d6d843a8a83229df33bfccd Mon Sep 17 00:00:00 2001
From: George Mamadashvili <georgemamadashvili@gmail.com>
Date: Thu, 25 Jul 2024 17:04:10 +0400
Subject: [PATCH] Zoom out: Get store action outside the loop (#63936)

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
---
 .../src/components/block-tools/zoom-out-mode-inserters.js     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js b/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js
index 45b1cf0f64bd7..bb044f9479c02 100644
--- a/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js
+++ b/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js
@@ -47,7 +47,7 @@ function ZoomOutModeInserters() {
 		};
 	}, [] );
 
-	const blockEditorDispatch = useDispatch( blockEditorStore );
+	const { showInsertionPoint } = useDispatch( blockEditorStore );
 
 	// Defer the initial rendering to avoid the jumps due to the animation.
 	useEffect( () => {
@@ -79,8 +79,6 @@ function ZoomOutModeInserters() {
 			hoveredBlockClientId === previousClientId ||
 			hoveredBlockClientId === nextClientId;
 
-		const { showInsertionPoint } = blockEditorDispatch;
-
 		return (
 			<BlockPopoverInbetween
 				key={ index }