mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
11 lines
385 B
JavaScript
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}`;
|
|
};
|