mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			400 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			400 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,
 | 
						|
  articleSlug
 | 
						|
) => {
 | 
						|
  const portalURL = buildPortalURL(portalSlug);
 | 
						|
  return `${portalURL}/articles/${articleSlug}`;
 | 
						|
};
 |