Skip to content

Commit

Permalink
Merge pull request #27254 from brave/issues/43329
Browse files Browse the repository at this point in the history
Move Sponsored Image Toggle
  • Loading branch information
tmancey authored Jan 15, 2025
2 parents 5f9ec02 + 7c9f1d0 commit 7ec5f61
Showing 1 changed file with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ class BackgroundImageSettings extends React.PureComponent<Props, State> {
size='small'
/>
</SettingsRow>
{braveRewardsSupported && (
<SettingsRow>
<SponsoredImageToggle
onChange={toggleBrandedWallpaperOptIn}
onEnableRewards={onEnableRewards}
checked={showBackgroundImage && brandedWallpaperOptIn}
disabled={!showBackgroundImage /* This option can only be enabled if users opt in for background images */}
rewardsEnabled={this.props.newTabData.rewardsState.rewardsEnabled}
isExternalWalletConnected={
Boolean(this.props.newTabData.rewardsState.externalWallet)} />
</SettingsRow>
)}
{showBackgroundImage && featureCustomBackgroundEnabled && (
<StyledCustomBackgroundSettings>
{this.renderUploadButton(this.onClickCustomBackground, usingCustomImageBackground, /* showTitle= */ true, this.props.newTabData.customImageBackgrounds)}
Expand Down Expand Up @@ -188,19 +200,6 @@ class BackgroundImageSettings extends React.PureComponent<Props, State> {
</StyledCustomBackgroundOption>
</StyledCustomBackgroundSettings>
)}
<div style={{ height: '16px' }}/>
{braveRewardsSupported && (
<SettingsRow>
<SponsoredImageToggle
onChange={toggleBrandedWallpaperOptIn}
onEnableRewards={onEnableRewards}
checked={showBackgroundImage && brandedWallpaperOptIn}
disabled={!showBackgroundImage /* This option can only be enabled if users opt in for background images */}
rewardsEnabled={this.props.newTabData.rewardsState.rewardsEnabled}
isExternalWalletConnected={
Boolean(this.props.newTabData.rewardsState.externalWallet)} />
</SettingsRow>
)}
</div>
)}
{this.state.location === Location.SOLID_COLORS &&
Expand Down

0 comments on commit 7ec5f61

Please sign in to comment.