From 5416326512b15613ecdd73b922f0b6858d2eb4b2 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Sun, 12 May 2024 11:34:03 +0900 Subject: [PATCH] Change useLayutEffect to useEffect --- packages/edit-site/src/components/layout/router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/layout/router.js b/packages/edit-site/src/components/layout/router.js index fbb4f29e65315..8d9e14db92a9f 100644 --- a/packages/edit-site/src/components/layout/router.js +++ b/packages/edit-site/src/components/layout/router.js @@ -3,7 +3,7 @@ */ import { privateApis as routerPrivateApis } from '@wordpress/router'; import { __ } from '@wordpress/i18n'; -import { useLayoutEffect } from '@wordpress/element'; +import { useEffect } from '@wordpress/element'; /** * Internal dependencies */ @@ -33,7 +33,7 @@ export default function useLayoutAreas() { const { params } = useLocation(); const { postType, postId, path, layout, isCustom, canvas } = params; - useLayoutEffect( () => { + useEffect( () => { // `/wp_template_part/all` path is no longer used and redirects to // Patterns page for backward compatibility. if ( path === '/wp_template_part/all' ) {