diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/pattern-screen/sidebar-pattern-screen.tsx b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/pattern-screen/sidebar-pattern-screen.tsx index 78d5f4a1346..8d2cc93a674 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/pattern-screen/sidebar-pattern-screen.tsx +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/pattern-screen/sidebar-pattern-screen.tsx @@ -8,6 +8,7 @@ import { useRef, useState, } from '@wordpress/element'; +import { useAsyncList } from '@wordpress/compose'; import { useSelect, useDispatch, select } from '@wordpress/data'; import { BlockInstance, cloneBlock } from '@wordpress/blocks'; import { close } from '@wordpress/icons'; @@ -108,6 +109,8 @@ export const SidebarPatternScreen = ( { category }: { category: string } ) => { ); }, [ category, patterns ] ); + const asyncSortedPatterns = useAsyncList( sortedPatterns ); + const [ patternPagination, setPatternPagination ] = useState( 10 ); const refElement = useRef< HTMLDivElement >( null ); @@ -243,11 +246,11 @@ export const SidebarPatternScreen = ( { category }: { category: string } ) => { ) } { ! isSpinnerVisible && (