15 lines
413 B
JavaScript
15 lines
413 B
JavaScript
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}`;
|
|
};
|