Skip to content

Commit

Permalink
Query Block: Remove redundant sticky state (#66126)
Browse files Browse the repository at this point in the history
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
  • Loading branch information
3 people authored Oct 16, 2024
1 parent 3948575 commit 1c59340
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,14 @@ export default function QueryInspectorControls( props ) {
format,
} = query;
const allowedControls = useAllowedControls( attributes );
const [ showSticky, setShowSticky ] = useState( postType === 'post' );
const showSticky = postType === 'post';
const {
postTypesTaxonomiesMap,
postTypesSelectOptions,
postTypeFormatSupportMap,
} = usePostTypes();
const taxonomies = useTaxonomies( postType );
const isPostTypeHierarchical = useIsPostTypeHierarchical( postType );
useEffect( () => {
setShowSticky( postType === 'post' );
}, [ postType ] );
const onPostTypeChange = ( newValue ) => {
const updateQuery = { postType: newValue };
// We need to dynamically update the `taxQuery` property,
Expand Down

1 comment on commit 1c59340

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 1c59340.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11363794733
📝 Reported issues:

Please sign in to comment.