From 0696d4cc2cf8cd1bca14fd9d4a06431915000102 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Mon, 16 Jul 2018 16:19:44 +0800 Subject: [PATCH] Remove `isSelected` boolean and inline InspectorControls --- core-blocks/archives/edit.js | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/core-blocks/archives/edit.js b/core-blocks/archives/edit.js index 262d7532bd083f..c39c81170adb60 100644 --- a/core-blocks/archives/edit.js +++ b/core-blocks/archives/edit.js @@ -19,29 +19,25 @@ import { BlockControls, } from '@wordpress/editor'; -export default function ArchivesEdit( { attributes, isSelected, setAttributes } ) { +export default function ArchivesEdit( { attributes, setAttributes } ) { const { align, showPostCounts, displayAsDropdown } = attributes; - const inspectorControls = isSelected && ( - - - setAttributes( { showPostCounts: ! showPostCounts } ) } - /> - setAttributes( { displayAsDropdown: ! displayAsDropdown } ) } - /> - - - ); - return ( - { inspectorControls } + + + setAttributes( { showPostCounts: ! showPostCounts } ) } + /> + setAttributes( { displayAsDropdown: ! displayAsDropdown } ) } + /> + +