@woocommerce/data
Version:
WooCommerce Admin data store and utilities
53 lines (52 loc) • 1.58 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.geolocationError = exports.geolocationSuccess = exports.getCountriesError = exports.getCountriesSuccess = exports.getLocalesError = exports.getLocalesSuccess = void 0;
/**
* Internal dependencies
*/
const action_types_1 = __importDefault(require("./action-types"));
function getLocalesSuccess(locales) {
return {
type: action_types_1.default.GET_LOCALES_SUCCESS,
locales,
};
}
exports.getLocalesSuccess = getLocalesSuccess;
function getLocalesError(error) {
return {
type: action_types_1.default.GET_LOCALES_ERROR,
error,
};
}
exports.getLocalesError = getLocalesError;
function getCountriesSuccess(countries) {
return {
type: action_types_1.default.GET_COUNTRIES_SUCCESS,
countries,
};
}
exports.getCountriesSuccess = getCountriesSuccess;
function getCountriesError(error) {
return {
type: action_types_1.default.GET_COUNTRIES_ERROR,
error,
};
}
exports.getCountriesError = getCountriesError;
function geolocationSuccess(geolocation) {
return {
type: action_types_1.default.GEOLOCATION_SUCCESS,
geolocation,
};
}
exports.geolocationSuccess = geolocationSuccess;
function geolocationError(error) {
return {
type: action_types_1.default.GEOLOCATION_ERROR,
error,
};
}
exports.geolocationError = geolocationError;