react-instantsearch-core
Version:
⚡ Lightning-fast search for React, by Algolia
21 lines (20 loc) • 687 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.usePoweredBy = usePoweredBy;
var _utils = require("instantsearch.js/cjs/lib/utils");
function usePoweredBy() {
var hostname = (0, _utils.safelyRunOnBrowser)(function (_ref) {
var _window$location;
var window = _ref.window;
return ((_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname) || '';
}, {
fallback: function fallback() {
return '';
}
});
return {
url: "https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&utm_content=".concat(hostname, "&utm_campaign=poweredby")
};
}
;