diff --git a/components/page-header/Header.tsx b/components/page-header/Header.tsx index 7f5ff9558d..92e073c3d4 100644 --- a/components/page-header/Header.tsx +++ b/components/page-header/Header.tsx @@ -30,7 +30,7 @@ import styles from './Header.module.scss' export const Header = () => { const router = useRouter() const { error } = useMainContext() - const { isHomepageVersion, currentProduct, currentProductTree, allVersions } = useMainContext() + const { isHomepageVersion, currentProduct, allVersions } = useMainContext() const { currentVersion } = useVersion() const { t } = useTranslation(['header']) const isRestPage = currentProduct && currentProduct.id === 'rest' @@ -50,7 +50,8 @@ export const Header = () => { const signupCTAVisible = hasAccount === false && // don't show if `null` (currentVersion === DEFAULT_VERSION || currentVersion === 'enterprise-cloud@latest') - const productTitle = currentProductTree?.shortTitle || currentProductTree?.title + const productTitle = currentProduct?.name || null + const [windowSize, setWindowSize] = useState(0) const handleWindowResize = useCallback(() => { setWindowSize(window.innerWidth) @@ -347,14 +348,11 @@ export const Header = () => { sx={{ display: 'block' }} > - {error === '404' || - !currentProduct || - isSearchResultsPage || - !currentProductTree ? null : ( + {error === '404' || !currentProduct || isSearchResultsPage ? null : (
{productTitle}