Files
chatwoot/app/javascript/dashboard/helper/portalHelper.js

11 lines
385 B
JavaScript

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