예제 #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;
};