Skip to content

Commit

Permalink
Template Parts: Remove unnecessary 'useCallback' (#46420)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Dec 9, 2022
1 parent da8c004 commit cdf49b3
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { useCallback, useMemo, useState } from '@wordpress/element';
import { useMemo, useState } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { store as noticesStore } from '@wordpress/notices';
import { useDispatch } from '@wordpress/data';
Expand Down Expand Up @@ -57,7 +57,7 @@ export default function TemplatePartSelectionModal( {

const { createSuccessNotice } = useDispatch( noticesStore );

const onTemplatePartSelect = useCallback( ( templatePart ) => {
const onTemplatePartSelect = ( templatePart ) => {
setAttributes( {
slug: templatePart.slug,
theme: templatePart.theme,
Expand All @@ -74,7 +74,7 @@ export default function TemplatePartSelectionModal( {
}
);
onClose();
}, [] );
};

const createFromBlocks = useCreateTemplatePartFromBlocks(
area,
Expand Down

0 comments on commit cdf49b3

Please sign in to comment.