From f61c0a377f95c88635c3fcb709c62fc54b1d8278 Mon Sep 17 00:00:00 2001 From: iseulde Date: Wed, 17 Jan 2018 21:56:27 +0100 Subject: [PATCH] Simplify dispatch to props --- editor/components/block-list/shortcuts.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/editor/components/block-list/shortcuts.js b/editor/components/block-list/shortcuts.js index ebf921c553e8d3..918fdc9b30aab2 100644 --- a/editor/components/block-list/shortcuts.js +++ b/editor/components/block-list/shortcuts.js @@ -98,14 +98,7 @@ class BlockListShortcuts extends Component { } } -export default connect( - null, - ( dispatch ) => ( { - onReplace( uids, blocks ) { - dispatch( replaceBlocks( uids, blocks ) ); - }, - onChange( uid, attributes ) { - dispatch( updateBlockAttributes( uid, attributes ) ); - }, - } ) -)( BlockListShortcuts ); +export default connect( null, { + onReplace: replaceBlocks, + onChange: updateBlockAttributes, +} )( BlockListShortcuts );