示例#1
0
文件: index.js 项目: noxee/wp-calypso
export default connect( ( state ) => ( {
	sectionName: getSectionName( state ),
	isSectionLoading: isSectionLoading( state ),
	tourState: getGuidedTourState( state ),
	isValid: ( when ) => !! when( state ),
	lastAction: getLastAction( state ),
} ), {
示例#2
0
export const hasAnalyticsEventFired = eventName => state => {
	const last = getLastAction( state );
	return (
		last.type === ANALYTICS_EVENT_RECORD &&
		last.meta.analytics.some( record => record.payload.name === eventName )
	);
};
示例#3
0
	state => ( {
		sectionName: getSectionName( state ),
		isSectionLoading: isSectionLoading( state ),
		tourState: getGuidedTourState( state ),
		isValid: when => !! when( state ),
		lastAction: getLastAction( state ),
		requestedTour: getInitialQueryArguments( state ).tour,
	} ),
示例#4
0
export const hasUserPastedFromGoogleDocs = state => {
	const action = getLastAction( state ) || false;
	return action && action.type === EDITOR_PASTE_EVENT && action.source === SOURCE_GOOGLE_DOCS;
};