({ ad }: { ad: Ad })
| 80 | ); |
| 81 | |
| 82 | const AdRow = ({ ad }: { ad: Ad }): ReactElement => { |
| 83 | const { logEvent } = useLogContext(); |
| 84 | const adImprovementsV3 = useFeature(adImprovementsV3Feature); |
| 85 | const faviconSrc = getAdFaviconImageLink({ ad, adImprovementsV3, size: 24 }); |
| 86 | const adLabel = useScrambler('Ad'); |
| 87 | const impressionRef = useLogImpression( |
| 88 | { |
| 89 | type: FeedItemType.Ad, |
| 90 | ad, |
| 91 | index: AD_SLOT_INDEX, |
| 92 | updatedAt: 0, |
| 93 | dataUpdatedAt: 0, |
| 94 | }, |
| 95 | AD_SLOT_INDEX, |
| 96 | 1, |
| 97 | 0, |
| 98 | AD_SLOT_INDEX, |
| 99 | DAILY_FEED_NAME, |
| 100 | undefined, |
| 101 | undefined, |
| 102 | Origin.DailyPage, |
| 103 | ); |
| 104 | |
| 105 | return ( |
| 106 | <li ref={impressionRef}> |
| 107 | <a |
| 108 | href={ad.link} |
| 109 | target="_blank" |
| 110 | rel="noopener noreferrer sponsored" |
| 111 | title={ad.description} |
| 112 | {...combinedClicks(() => |
| 113 | logEvent( |
| 114 | adLogEvent(LogEvent.Click, ad, { |
| 115 | columns: 1, |
| 116 | column: 0, |
| 117 | row: AD_SLOT_INDEX, |
| 118 | ...dailyFeedExtra(), |
| 119 | }), |
| 120 | ), |
| 121 | )} |
| 122 | className="group flex w-full items-center gap-4 px-4 py-4 text-left transition-colors hover:bg-surface-float tablet:px-5" |
| 123 | > |
| 124 | <Typography |
| 125 | tag={TypographyTag.H3} |
| 126 | type={TypographyType.Body} |
| 127 | bold |
| 128 | color={TypographyColor.Primary} |
| 129 | className="min-w-0 max-w-3xl flex-1 !leading-snug" |
| 130 | > |
| 131 | {ad.description} |
| 132 | </Typography> |
| 133 | <span className="ml-auto flex shrink-0 items-center gap-2"> |
| 134 | <Typography |
| 135 | type={TypographyType.Caption1} |
| 136 | color={TypographyColor.Quaternary} |
| 137 | suppressHydrationWarning |
| 138 | > |
| 139 | {adLabel} |
nothing calls this directly
no test coverage detected