Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelchris authored Nov 14, 2024
2 parents 86f2d9b + 30440be commit 1520523
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
6 changes: 1 addition & 5 deletions packages/shared/src/components/cards/ad/AdGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import AdAttribution from './common/AdAttribution';
import { AdImage } from './common/AdImage';
import { AdPixel } from './common/AdPixel';
import type { AdCardProps } from './common/common';
import { RemoveAd } from './common/RemoveAd';

export const AdGrid = forwardRef(function AdGrid(
{ ad, onLinkClick, domProps }: AdCardProps,
Expand All @@ -28,10 +27,7 @@ export const AdGrid = forwardRef(function AdGrid(
<CardSpace />
<AdImage ad={ad} ImageComponent={CardImage} />
<CardTextContainer>
<div className="flex items-center pt-2">
<AdAttribution ad={ad} />
<RemoveAd />
</div>
<AdAttribution ad={ad} className={{ main: 'mb-2 mt-4' }} />
</CardTextContainer>
<AdPixel pixel={ad.pixel} />
</Card>
Expand Down
16 changes: 8 additions & 8 deletions packages/shared/src/components/cards/ad/AdList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ import {
CardSpace,
CardTitle,
} from '../common/list/ListCard';
import AdAttribution from './common/AdAttribution';
import FeedItemContainer from '../common/list/FeedItemContainer';
import type { AdCardProps } from './common/common';
import { AdImage } from './common/AdImage';
import { AdPixel } from './common/AdPixel';
import { Ad } from '../../../graphql/posts';
import { combinedClicks } from '../../../lib/click';
import AdAttribution from './common/AdAttribution';

import { RemoveAd } from './common/RemoveAd';

const getLinkProps = ({
ad,
Expand All @@ -44,19 +42,21 @@ export const AdList = forwardRef(function AdCard(
<FeedItemContainer
domProps={domProps}
ref={ref}
flagProps={{
adAttribution: (
<AdAttribution ad={ad} className={{ typo: 'typo-caption1' }} />
),
type: undefined,
}}
data-testid="adItem"
linkProps={getLinkProps({ ad, onLinkClick })}
>
<CardContent>
<CardTitle className="!mt-0 mr-4 line-clamp-4 flex-1 font-bold typo-title3">
<CardTitle className="mr-4 line-clamp-4 flex-1 font-bold typo-title3">
{ad.description}
</CardTitle>
<AdImage ad={ad} ImageComponent={CardImage} className="mt-4" />
</CardContent>
<div className="z-1 flex items-center pt-4">
<AdAttribution ad={ad} />
<RemoveAd />
</div>
<CardSpace />
<AdPixel pixel={ad.pixel} />
</FeedItemContainer>
Expand Down

0 comments on commit 1520523

Please sign in to comment.