From ae685de6eb3841e1b8f5047ad7aacfdccb174ad2 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Tue, 7 Aug 2018 13:21:08 +0200 Subject: [PATCH] Removed unused variables and withInstanceId. Thanks for the feedback, @paulwilde. --- packages/editor/src/components/post-comments/index.js | 5 ++--- packages/editor/src/components/post-pending-status/index.js | 5 ++--- packages/editor/src/components/post-pingbacks/index.js | 5 ++--- packages/editor/src/components/post-sticky/index.js | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/editor/src/components/post-comments/index.js b/packages/editor/src/components/post-comments/index.js index 1615534a2eeab..9cbae279d2bbc 100644 --- a/packages/editor/src/components/post-comments/index.js +++ b/packages/editor/src/components/post-comments/index.js @@ -3,10 +3,10 @@ */ import { __ } from '@wordpress/i18n'; import { CheckboxControl } from '@wordpress/components'; -import { withInstanceId, compose } from '@wordpress/compose'; +import { compose } from '@wordpress/compose'; import { withSelect, withDispatch } from '@wordpress/data'; -function PostComments( { commentStatus = 'open', instanceId, ...props } ) { +function PostComments( { commentStatus = 'open', ...props } ) { const onToggleComments = () => props.editPost( { comment_status: commentStatus === 'open' ? 'closed' : 'open' } ); return ( @@ -27,5 +27,4 @@ export default compose( [ withDispatch( ( dispatch ) => ( { editPost: dispatch( 'core/editor' ).editPost, } ) ), - withInstanceId, ] )( PostComments ); diff --git a/packages/editor/src/components/post-pending-status/index.js b/packages/editor/src/components/post-pending-status/index.js index 544ea76cab8e4..7712956b5955c 100644 --- a/packages/editor/src/components/post-pending-status/index.js +++ b/packages/editor/src/components/post-pending-status/index.js @@ -4,14 +4,14 @@ import { __ } from '@wordpress/i18n'; import { CheckboxControl } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; -import { withInstanceId, compose } from '@wordpress/compose'; +import { compose } from '@wordpress/compose'; /** * Internal dependencies */ import PostPendingStatusCheck from './check'; -export function PostPendingStatus( { instanceId, status, onUpdateStatus } ) { +export function PostPendingStatus( { status, onUpdateStatus } ) { const togglePendingStatus = () => { const updatedStatus = status === 'pending' ? 'draft' : 'pending'; onUpdateStatus( updatedStatus ); @@ -37,5 +37,4 @@ export default compose( dispatch( 'core/editor' ).editPost( { status } ); }, } ) ), - withInstanceId )( PostPendingStatus ); diff --git a/packages/editor/src/components/post-pingbacks/index.js b/packages/editor/src/components/post-pingbacks/index.js index 63c0cc02497c7..b037b5a868b26 100644 --- a/packages/editor/src/components/post-pingbacks/index.js +++ b/packages/editor/src/components/post-pingbacks/index.js @@ -4,9 +4,9 @@ import { __ } from '@wordpress/i18n'; import { CheckboxControl } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; -import { withInstanceId, compose } from '@wordpress/compose'; +import { compose } from '@wordpress/compose'; -function PostPingbacks( { pingStatus = 'open', instanceId, ...props } ) { +function PostPingbacks( { pingStatus = 'open', ...props } ) { const onTogglePingback = () => props.editPost( { ping_status: pingStatus === 'open' ? 'closed' : 'open' } ); return ( @@ -27,5 +27,4 @@ export default compose( [ withDispatch( ( dispatch ) => ( { editPost: dispatch( 'core/editor' ).editPost, } ) ), - withInstanceId, ] )( PostPingbacks ); diff --git a/packages/editor/src/components/post-sticky/index.js b/packages/editor/src/components/post-sticky/index.js index 3df854fa34fbf..ac259e568d446 100644 --- a/packages/editor/src/components/post-sticky/index.js +++ b/packages/editor/src/components/post-sticky/index.js @@ -4,14 +4,14 @@ import { __ } from '@wordpress/i18n'; import { CheckboxControl } from '@wordpress/components'; import { withSelect, withDispatch } from '@wordpress/data'; -import { withInstanceId, compose } from '@wordpress/compose'; +import { compose } from '@wordpress/compose'; /** * Internal dependencies */ import PostStickyCheck from './check'; -export function PostSticky( { onUpdateSticky, postSticky = false, instanceId } ) { +export function PostSticky( { onUpdateSticky, postSticky = false } ) { return (