Beispiel #1
0
export default connect( ( state ) => ( {
	sectionName: getSectionName( state ),
	isSectionLoading: isSectionLoading( state ),
	tourState: getGuidedTourState( state ),
	isValid: ( when ) => !! when( state ),
	lastAction: getLastAction( state ),
} ), {
Beispiel #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 )
	);
};
Beispiel #3
0
	state => ( {
		sectionName: getSectionName( state ),
		isSectionLoading: isSectionLoading( state ),
		tourState: getGuidedTourState( state ),
		isValid: when => !! when( state ),
		lastAction: getLastAction( state ),
		requestedTour: getInitialQueryArguments( state ).tour,
	} ),
Beispiel #4
0
export const hasUserPastedFromGoogleDocs = state => {
	const action = getLastAction( state ) || false;
	return action && action.type === EDITOR_PASTE_EVENT && action.source === SOURCE_GOOGLE_DOCS;
};