Skip to content

Commit

Permalink
Remove sync toggle for now
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Aug 30, 2023
1 parent 3be9487 commit f432bc2
Showing 1 changed file with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
__experimentalHStack as HStack,
FlexBlock,
Button,
__experimentalToggleGroupControl as ToggleGroupControl,
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
} from '@wordpress/components';
import { Icon, chevronRight, chevronLeft } from '@wordpress/icons';
import { focus } from '@wordpress/dom';
Expand Down Expand Up @@ -51,15 +49,6 @@ export const allPatternsCategory = {
name: 'allPatterns',
label: __( 'All patterns' ),
};
export const SYNC_TYPES = {
full: 'fully',
unsynced: 'unsynced',
};
const SYNC_FILTERS = {
all: __( 'All' ),
[ SYNC_TYPES.full ]: __( 'My synced' ),
[ SYNC_TYPES.unsynced ]: __( 'My standard' ),
};

function usePatternsCategories( rootClientId ) {
const { patterns: allPatterns, allCategories } = usePatternsState(
Expand Down Expand Up @@ -168,11 +157,6 @@ export function BlockPatternsCategoryPanel( {
onInsert,
rootClientId
);
const [ syncFilter, setSyncFilter ] = useState( 'all' );
const updateSyncFilter = ( value ) => {
//setCurrentPage( 1 );
setSyncFilter( value );
};
const availableCategories = usePatternsCategories( rootClientId );
const currentCategoryPatterns = useMemo(
() =>
Expand Down Expand Up @@ -224,28 +208,6 @@ export function BlockPatternsCategoryPanel( {
{ category.label }
</div>
<p>{ category.description }</p>
{ category.name === allPatternsCategory.name && (
<ToggleGroupControl
className="edit-site-patterns__sync-status-filter"
hideLabelFromVision
label={ __( 'Filter by sync status' ) }
value={ syncFilter }
isBlock
onChange={ ( value ) => updateSyncFilter( value ) }
__nextHasNoMarginBottom
>
{ Object.entries( SYNC_FILTERS ).map(
( [ key, label ] ) => (
<ToggleGroupControlOption
className="edit-site-patterns__sync-status-filter-option"
key={ key }
value={ key }
label={ label }
/>
)
) }
</ToggleGroupControl>
) }
<BlockPatternList
shownPatterns={ categoryPatternsAsyncList }
blockPatterns={ categoryPatterns }
Expand Down

0 comments on commit f432bc2

Please sign in to comment.