UNPKG

@atlaskit/profilecard

Version:

A React component to display a card with user information.

18 lines 1.14 kB
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'); }; export var getStudioHost = function getStudioHost() { return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL; }; export var getStudioPath = function getStudioPath(path) { return "".concat(getStudioHost()).concat(path); }; export var getAtlassianStudioAgentEditUrl = function getAtlassianStudioAgentEditUrl(siteId, agentId) { return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/:agentId/overview'))); }; export var getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId) { return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create'))); };