Skip to content

Commit

Permalink
Removed unused variables and withInstanceId.
Browse files Browse the repository at this point in the history
Thanks for the feedback, @paulwilde.
  • Loading branch information
jasmussen committed Aug 7, 2018
1 parent 3ddd4fb commit ae685de
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-comments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -27,5 +27,4 @@ export default compose( [
withDispatch( ( dispatch ) => ( {
editPost: dispatch( 'core/editor' ).editPost,
} ) ),
withInstanceId,
] )( PostComments );
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-pending-status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -37,5 +37,4 @@ export default compose(
dispatch( 'core/editor' ).editPost( { status } );
},
} ) ),
withInstanceId
)( PostPendingStatus );
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-pingbacks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -27,5 +27,4 @@ export default compose( [
withDispatch( ( dispatch ) => ( {
editPost: dispatch( 'core/editor' ).editPost,
} ) ),
withInstanceId,
] )( PostPingbacks );
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-sticky/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<PostStickyCheck>
<CheckboxControl
Expand All @@ -36,5 +36,4 @@ export default compose( [
},
};
} ),
withInstanceId,
] )( PostSticky );

0 comments on commit ae685de

Please sign in to comment.