Skip to content

Commit

Permalink
switch to withDispatch approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed Apr 18, 2018
1 parent 3baae76 commit 3444476
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class EditorProvider extends Component {

// Display a notice if an autosave exists.
if ( props.settings.autosave ) {
this.store.dispatch( showAutosaveNotice( props.settings.autosave ) );
this.props.showAutosaveNotice( props.settings.autosave );
}
}

Expand Down Expand Up @@ -114,11 +114,13 @@ export default withDispatch( ( dispatch ) => {
undo,
redo,
createUndoLevel,
showAutosaveNotice,
} = dispatch( 'core/editor' );
return {
setupEditor,
undo,
redo,
createUndoLevel,
showAutosaveNotice,
};
} )( EditorProvider );

0 comments on commit 3444476

Please sign in to comment.