chore: Remove static URLs from the documentation (#5461)
This commit is contained in:
10
app/javascript/dashboard/helper/portalHelper.js
Normal file
10
app/javascript/dashboard/helper/portalHelper.js
Normal 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}`;
|
||||
};
|
||||
Reference in New Issue
Block a user