Skip to content

Commit

Permalink
Revert "Reset sync filter setting to all each time it is mounted"
Browse files Browse the repository at this point in the history
This reverts commit 0ee4b81.
  • Loading branch information
glendaviesnz committed Sep 12, 2023
1 parent 0ee4b81 commit 8839f7a
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { SelectControl } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useDispatch, useSelect } from '@wordpress/data';
import { useEffect } from '@wordpress/element';

/**
* Internal dependencies
Expand All @@ -24,14 +23,6 @@ const patternSyncOptions = [
export function BlockPatternsSyncFilter() {
const { updateSettings } = useDispatch( blockEditorStore );

useEffect( () => {
updateSettings( {
patternsSyncFilter: 'all',
} );
// The first time the component is mounted, we want to reset the sync filter setting.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [] );

const syncFilter = useSelect( ( select ) => {
const { getSettings } = select( blockEditorStore );
const settings = getSettings();
Expand Down

0 comments on commit 8839f7a

Please sign in to comment.