Chatwoot/app/javascript/dashboard/helper/portalHelper.js

16 lines
413 B
JavaScript
Raw Normal View History

export const buildPortalURL = portalSlug => {
const { hostURL, helpCenterURL } = window.chatwootConfig;
const baseURL = helpCenterURL || hostURL || '';
return `${baseURL}/hc/${portalSlug}`;
};
export const buildPortalArticleURL = (
portalSlug,
categorySlug,
locale,
articleId
) => {
const portalURL = buildPortalURL(portalSlug);
return `${portalURL}/${locale}/${categorySlug}/${articleId}`;
};