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

Function buildPost

packages/shared/src/components/Feed.spec.tsx:2701–2720  ·  view source on GitHub ↗
(id: string, hero?: PostHero | null)

Source from the content-addressed store, hash-verified

2699const sourceFixture = defaultFeedPage.edges[0].node.source;
2700
2701const buildPost = (id: string, hero?: PostHero | null): Post =>
2702 ({
2703 id,
2704 title: `Post ${id}`,
2705 createdAt: '2026-05-25T00:00:00.000Z',
2706 image: 'https://daily.dev/img.png',
2707 readTime: 1,
2708 source: sourceFixture,
2709 tags: [],
2710 permalink: `http://localhost:4000/r/${id}`,
2711 numComments: 0,
2712 numUpvotes: 0,
2713 commentsPermalink: `http://localhost:5002/posts/${id}`,
2714 read: false,
2715 upvoted: false,
2716 commented: false,
2717 type: PostType.Article,
2718 domain: 'example.com',
2719 hero: hero ?? null,
2720 }) as Post;
2721
2722const SIGNIFICANCE_BY_SIZE: Record<number, PostHeroSignificance> = {
2723 4: 'breaking',

Callers 2

buildWidePostFunction · 0.70
Feed.spec.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected