Mini Shell

Direktori : /home/brasafestival/www/old/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/
Upload File :
Current File : /home/brasafestival/www/old/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/resolvers.js

import { __ } from '@wordpress/i18n';
import { errorNotice } from '../components/global-notices/store/actions';
import { setJetpackSettings } from './actions/jetpack-settings';
import { fetchWordAdsSettings } from './controls';

/**
 * Yield actions to get Search Module Status
 *
 * @yields {object} - an action object.
 * @returns {object} - an action object.
 */
export function* getWordAdsModuleStatus() {
	try {
		const settings = yield fetchWordAdsSettings();
		if ( settings ) {
			return setJetpackSettings( settings );
		}
	} catch ( e ) {
		return errorNotice( __( 'Error fetching settingsā€¦', 'jetpack-wordads' ) );
	}
}

export default { getWordAdsModuleStatus };

Zerion Mini Shell 1.0