Skip to content

Commit

Permalink
[Brave News]: Remove height restriction on ads (uplift to 1.62.x) (#2…
Browse files Browse the repository at this point in the history
…1429)

Uplift of #21427 (squashed) to beta
  • Loading branch information
brave-builds authored Dec 20, 2023
1 parent c0f962b commit 9c68b97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/brave_news/browser/resources/feed/Ad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ const CtaButton = styled(Button)`
align-self: flex-start;
`

const AdImage = styled(LargeImage)`
height: unset;
`

export const useVisibleFor = (callback: () => void, timeout: number) => {
const [el, setEl] = React.useState<HTMLElement | null>(null)
const callbackRef = React.useRef<() => void>()
Expand Down Expand Up @@ -106,7 +110,7 @@ export default function Advert(props: Props) {
}

return <Container ref={setAdEl} onClick={onDisplayAdVisited}>
<LargeImage src={imageUrl} />
<AdImage src={imageUrl} />
<MetaInfoContainer>
<BatAdLabel onClick={e => e.stopPropagation()} href="brave://rewards">{getLocale('braveNewsAdvertBadge')}</BatAdLabel>
Expand Down

0 comments on commit 9c68b97

Please sign in to comment.