File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ import type { Branding } from '../types/branding';
1515import { BrandingLabel } from './BrandingLabel' ;
1616
1717export type Props = {
18- accentColor : string ;
1918 branding : Branding ;
19+ accentColor ?: string ;
2020} ;
2121
2222const HOSTED_CONTENT_HEIGHT_MOBILE = 48 ;
@@ -256,14 +256,14 @@ const HostedContentLogo = () => (
256256 </ div >
257257) ;
258258
259- export const HostedContentHeader = ( { accentColor , branding } : Props ) => {
259+ export const HostedContentHeader = ( { branding , accentColor } : Props ) => {
260260 return (
261261 < HeaderWrapper >
262262 < Left >
263263 < HeaderSection isFirst = { true } >
264264 < TitleAndBadge
265- accentColor = { accentColor }
266265 branding = { branding }
266+ accentColor = { accentColor }
267267 />
268268 </ HeaderSection >
269269 < HeaderSection >
Original file line number Diff line number Diff line change @@ -62,12 +62,12 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
6262 const mainMedia = frontendData . mainMediaElements [ 0 ] ;
6363 const mainMediaCaptionText = decideMainMediaCaption ( mainMedia ) ;
6464
65- const branding =
66- frontendData . commercialProperties [ frontendData . editionId ] . branding ;
65+ const { branding } =
66+ frontendData . commercialProperties [ frontendData . editionId ] ;
6767
6868 return (
6969 < >
70- { props . renderingTarget === 'Web' ? (
70+ { props . renderingTarget === 'Web' && branding ? (
7171 < Stuck >
7272 < Section
7373 fullWidth = { true }
@@ -79,8 +79,8 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
7979 element = "aside"
8080 >
8181 < HostedContentHeader
82- accentColor = { branding . hostedCampaignColour }
8382 branding = { branding }
83+ accentColor = { branding . hostedCampaignColour }
8484 />
8585 </ Section >
8686 </ Stuck >
Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ export const HostedGalleryLayout = (props: WebProps | AppProps) => {
4545 format,
4646 } = props ;
4747
48- const branding =
49- frontendData . commercialProperties [ frontendData . editionId ] . branding ;
48+ const { branding } =
49+ frontendData . commercialProperties [ frontendData . editionId ] ;
5050
5151 return (
5252 < >
53- { props . renderingTarget === 'Web' ? (
53+ { props . renderingTarget === 'Web' && branding ? (
5454 < Stuck >
5555 < Section
5656 fullWidth = { true }
@@ -62,8 +62,8 @@ export const HostedGalleryLayout = (props: WebProps | AppProps) => {
6262 element = "aside"
6363 >
6464 < HostedContentHeader
65- accentColor = { branding . hostedCampaignColour }
6665 branding = { branding }
66+ accentColor = { branding . hostedCampaignColour }
6767 />
6868 </ Section >
6969 </ Stuck >
You can’t perform that action at this time.
0 commit comments