Skip to content

Commit c2afa20

Browse files
committed
fix: adjust AdvBanner styles and enforce feed display in ad fetching
1 parent 351ae0b commit c2afa20

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/features/adv/components/AdvBanner.css

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
padding: 1em 1em;
7979
overflow: hidden;
8080
box-sizing: border-box;
81-
height: 180px;
81+
height: 190px;
8282
border-radius: 8px;
8383
gap: 1em;
8484
font-size: 14px;
@@ -120,8 +120,8 @@
120120
}
121121

122122
.carbonCoverImage {
123-
width: 80px;
124-
height: 80px;
123+
width: 120px;
124+
height: 120px;
125125
z-index: 2;
126126
object-fit: cover;
127127
border-radius: 10px;
@@ -131,7 +131,7 @@
131131

132132
.carbonCoverMain {
133133
display: flex;
134-
gap: 0.5em;
134+
gap: 0.2em;
135135
color: #fff;
136136
flex-grow: 1;
137137
flex-direction: column;
@@ -140,7 +140,7 @@
140140
}
141141

142142
.carbonCoverLogo {
143-
max-width: 125px;
143+
max-width: 100px;
144144
}
145145

146146
.carbonCoverButton {
@@ -191,8 +191,8 @@
191191

192192
.carbonCover:hover .carbonCoverImage,
193193
.carbonCover:focus-within .carbonCoverImage {
194-
width: 90px;
195-
height: 90px;
194+
width: 80px;
195+
height: 80px;
196196
filter: brightness(1.05);
197197
}
198198

@@ -259,7 +259,11 @@
259259
width: 100%;
260260
max-width: none;
261261
}
262+
.advFeed .carbonCoverLogo {
263+
max-width: 125px;
264+
}
262265
.advFeed .carbonCover {
266+
font-size: 16px;
263267
aspect-ratio: 16 / 9;
264268
height: auto;
265269
margin-bottom: 12px;
@@ -268,6 +272,10 @@
268272
width: 180px;
269273
height: 180px;
270274
}
275+
.advFeed .carbonCoverMain {
276+
gap: 0.5em;
277+
}
278+
271279
.advFeed .placeholder {
272280
padding: 0;
273281
height: 100%;

src/features/adv/components/AdvBanner.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const AdvBanner = ({ feedDisplay = false, loadingState, onAdLoaded }: Adv
2424
isError,
2525
} = useGetAd({
2626
keywords: userSelectedTags.map((tag) => tag.label.toLocaleLowerCase()),
27-
feed: feedDisplay,
27+
feed: true,
2828
aditionalAdQueries: aditionalAdQueries,
2929
config: {
3030
cacheTime: 0,
@@ -74,11 +74,6 @@ export const AdvBanner = ({ feedDisplay = false, loadingState, onAdLoaded }: Adv
7474
<div className="carbonCoverButton">{ad.callToAction}</div>
7575
</div>
7676
</a>
77-
{!feedDisplay && (
78-
<a className="carbonAttribution" href="#">
79-
{ad.provider.title}
80-
</a>
81-
)}
8277
</div>
8378
</>
8479
)

0 commit comments

Comments
 (0)