diff --git a/app/javascript/dashboard/helper/portalHelper.js b/app/javascript/dashboard/helper/portalHelper.js index ec681ef1b..4df38c5bc 100644 --- a/app/javascript/dashboard/helper/portalHelper.js +++ b/app/javascript/dashboard/helper/portalHelper.js @@ -19,7 +19,7 @@ const getDefaultBaseURL = () => { throw new Error('No valid base URL found in configuration'); } - return `${baseURL}/hc`; + return baseURL; }; /** @@ -39,7 +39,7 @@ const getPortalBaseURL = customDomain => */ export const buildPortalURL = (portalSlug, customDomain) => { const baseURL = getPortalBaseURL(customDomain); - return `${baseURL}/${portalSlug}`; + return `${baseURL}/hc/${portalSlug}`; }; export const buildPortalArticleURL = ( diff --git a/app/javascript/dashboard/helper/specs/portalHelper.spec.js b/app/javascript/dashboard/helper/specs/portalHelper.spec.js index daa188b28..db3e41583 100644 --- a/app/javascript/dashboard/helper/specs/portalHelper.spec.js +++ b/app/javascript/dashboard/helper/specs/portalHelper.spec.js @@ -39,7 +39,7 @@ describe('PortalHelper', () => { 'article-slug', 'custom-domain.dev' ) - ).toEqual('https://custom-domain.dev/handbook/articles/article-slug'); + ).toEqual('https://custom-domain.dev/hc/handbook/articles/article-slug'); }); it('handles https in custom domain correctly', () => { @@ -55,7 +55,7 @@ describe('PortalHelper', () => { 'article-slug', 'https://custom-domain.dev' ) - ).toEqual('https://custom-domain.dev/handbook/articles/article-slug'); + ).toEqual('https://custom-domain.dev/hc/handbook/articles/article-slug'); }); it('uses hostURL when helpCenterURL is not available', () => {