Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitmathur-7 committed Dec 9, 2024
1 parent eb7b51a commit ac915f4
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions packages/block-editor/src/components/inserter/quick-inserter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ import { useSelect } from '@wordpress/data';
*/
import InserterSearchResults from './search-results';
import useInsertionPoint from './hooks/use-insertion-point';
// import usePatternsState from './hooks/use-patterns-state';
import useBlockTypesState from './hooks/use-block-types-state';
import { store as blockEditorStore } from '../../store';

const SEARCH_THRESHOLD = 6;
const SHOWN_BLOCK_TYPES = 6;
// const SHOWN_BLOCK_PATTERNS = 2;
// const SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION = 4;

export default function QuickInserter( {
onSelect,
Expand All @@ -47,12 +44,6 @@ export default function QuickInserter( {
onInsertBlocks,
true
);
// const [ patterns ] = usePatternsState(
// onInsertBlocks,
// destinationRootClientId,
// undefined,
// true
// );

const { setInserterIsOpened, insertionIndex } = useSelect(
( select ) => {
Expand All @@ -70,8 +61,6 @@ export default function QuickInserter( {
[ clientId ]
);

// const showPatterns =
// patterns.length && ( !! filterValue || prioritizePatterns );
const showSearch = hasSearch && blockTypes.length > SEARCH_THRESHOLD;

useEffect( () => {
Expand All @@ -91,13 +80,6 @@ export default function QuickInserter( {
} );
};

// let maxBlockPatterns = 0;
// if ( showPatterns ) {
// maxBlockPatterns = prioritizePatterns
// ? SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION
// : SHOWN_BLOCK_PATTERNS;
// }

return (
<div
className={ clsx( 'block-editor-inserter__quick-inserter', {
Expand Down

0 comments on commit ac915f4

Please sign in to comment.