Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Integrate post list share action with the unified modal.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { siteHasFeature } from '@automattic/jetpack-script-data';
import { dispatch } from '@wordpress/data';
import { store as interfaceStore } from '@wordpress/interface';
import { store as socialStore } from '../../social-store';
import { features } from '../../utils';

/**
* Handle a particular Jetpack Editor action.
Expand All @@ -21,8 +23,13 @@ export function handleSharePostAction(
// First open the sidebar
enableComplementaryArea( 'core', sidebarToOpen );

const { openSharePostModal, openUnifiedModal } = dispatch( socialStore );
// Then open the share post modal
dispatch( socialStore ).openSharePostModal();
if ( siteHasFeature( features.UNIFIED_UI_V1 ) ) {
openUnifiedModal();
} else {
openSharePostModal();
}

return removeQueryArg;
}
Loading