chore: Remove static URLs from the documentation (#5461)

This commit is contained in:
Pranav Raj S
2022-09-19 21:52:01 -07:00
committed by GitHub
parent 3a1e521b4c
commit 1761100c77
52 changed files with 120 additions and 92 deletions

View File

@@ -0,0 +1,10 @@
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}`;
};