Skip to content

Commit

Permalink
Patterns: split up the block editor inserter patterns tab into separa…
Browse files Browse the repository at this point in the history
…te component files (#55315)
  • Loading branch information
glendaviesnz authored Nov 9, 2023
1 parent a880f38 commit f8b7bd4
Show file tree
Hide file tree
Showing 11 changed files with 527 additions and 475 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import PatternExplorerSidebar from './sidebar';
import PatternList from './patterns-list';
import { usePatternsCategories } from '../block-patterns-tab';
import PatternExplorerSidebar from './pattern-explorer-sidebar';
import PatternList from './pattern-list';
import { usePatternCategories } from '../block-patterns-tab/use-pattern-categories';

function PatternsExplorer( { initialCategory, rootClientId } ) {
const [ searchValue, setSearchValue ] = useState( '' );
Expand All @@ -20,7 +20,7 @@ function PatternsExplorer( { initialCategory, rootClientId } ) {
initialCategory?.name
);

const patternCategories = usePatternsCategories(
const patternCategories = usePatternCategories(
rootClientId,
patternSourceFilter
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import InserterListbox from '../../inserter-listbox';
import { searchItems } from '../search-items';
import BlockPatternsPaging from '../../block-patterns-paging';
import usePatternsPaging from '../hooks/use-patterns-paging';
import { allPatternsCategory, myPatternsCategory } from '../block-patterns-tab';
import {
allPatternsCategory,
myPatternsCategory,
} from '../block-patterns-tab/utils';

function PatternsListHeader( { filterValue, filteredBlockPatternsLength } ) {
if ( ! filterValue ) {
Expand Down
Loading

0 comments on commit f8b7bd4

Please sign in to comment.