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

Function buildPost

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

Source from the content-addressed store, hash-verified

1782const sourceFixture = defaultFeedPage.edges[0].node.source;
1783
1784const buildPost = (id: string, hero?: PostHero | null): Post =>
1785 ({
1786 id,
1787 title: `Post ${id}`,
1788 createdAt: '2026-05-25T00:00:00.000Z',
1789 image: 'https://daily.dev/img.png',
1790 readTime: 1,
1791 source: sourceFixture,
1792 tags: [],
1793 permalink: `http://localhost:4000/r/${id}`,
1794 numComments: 0,
1795 numUpvotes: 0,
1796 commentsPermalink: `http://localhost:5002/posts/${id}`,
1797 read: false,
1798 upvoted: false,
1799 commented: false,
1800 type: PostType.Article,
1801 domain: 'example.com',
1802 hero: hero ?? null,
1803 } as Post);
1804
1805const SIGNIFICANCE_BY_SIZE: Record<number, PostHeroSignificance> = {
1806 4: 'breaking',

Callers 2

buildWidePostFunction · 0.70
Feed.spec.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected