From 387950b4954debd89c09bf5a6618e591915873de Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Thu, 17 Jun 2021 12:47:19 +0100 Subject: [PATCH] Add conditional rendering to CobrandingLogo (#4221) Co-authored-by: Miguel Serrano GitOrigin-RevId: 033cc5bfdbbd3cc03d11f28f9e2dc0cd6d95b8ff --- .../editor-navigation-toolbar/components/toolbar-header.js | 4 +++- .../components/toolbar-header.test.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js index fb22c31420..7450494231 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js @@ -39,7 +39,9 @@ function ToolbarHeader({
- {cobranding ? : null} + {cobranding && + cobranding.isProjectCobranded && + cobranding.logoImgUrl && }
{pdfButtonIsVisible && ( diff --git a/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js b/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js index 525e306c19..f7420c365b 100644 --- a/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js +++ b/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js @@ -29,6 +29,7 @@ describe('', function () { const props = { ...defaultProps, cobranding: { + isProjectCobranded: true, brandVariationHomeUrl: 'http://cobranding', brandVariationName: 'variation', logoImgUrl: 'http://cobranding/logo',