@atlaskit/profilecard
Version:
A React component to display a card with user information.
24 lines (23 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getStudioPath = exports.getStudioHost = exports.getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentDuplicateUrl = void 0;
var STUDIO_PROD_URL = 'https://studio.atlassian.com';
var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
var isStaging = function isStaging() {
var host = window.location.host;
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
};
var getStudioHost = exports.getStudioHost = function getStudioHost() {
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
};
var getStudioPath = exports.getStudioPath = function getStudioPath(path) {
return "".concat(getStudioHost()).concat(path);
};
var getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentEditUrl = function getAtlassianStudioAgentEditUrl(siteId, agentId) {
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/:agentId/overview')));
};
var getAtlassianStudioAgentDuplicateUrl = exports.getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId) {
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create')));
};