MCPcopy Create free account
hub / github.com/dailydotdev/apps / transformDigestAd

Function transformDigestAd

packages/shared/src/components/post/digest/utils.ts:3–17  ·  view source on GitHub ↗
(
  digestAd: DigestPostAd,
)

Source from the content-addressed store, hash-verified

1import type { Ad, DigestPostAd } from '../../../graphql/posts';
2
3export const transformDigestAd = (
4 digestAd: DigestPostAd,
5): { ad: Ad; index: number } => ({
6 ad: {
7 source: 'daily',
8 company: digestAd.companyName,
9 description: digestAd.title,
10 link: digestAd.link,
11 image: digestAd.image,
12 companyLogo: digestAd.companyLogo,
13 callToAction: digestAd.callToAction,
14 pixel: [],
15 },
16 index: digestAd.index,
17});

Callers 2

DigestPostContentRawFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected