Skip to content

Commit

Permalink
Change useLayutEffect to useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed May 12, 2024
1 parent 1e718aa commit 5416326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/edit-site/src/components/layout/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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' ) {
Expand Down

0 comments on commit 5416326

Please sign in to comment.