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

Function buildPost

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

Source from the content-addressed store, hash-verified

1733const sourceFixture = defaultFeedPage.edges[0].node.source;
1734
1735const buildPost = (id: string, hero?: PostHero | null): Post =>
1736 ({
1737 id,
1738 title: `Post ${id}`,
1739 createdAt: '2026-05-25T00:00:00.000Z',
1740 image: 'https://daily.dev/img.png',
1741 readTime: 1,
1742 source: sourceFixture,
1743 tags: [],
1744 permalink: `http://localhost:4000/r/${id}`,
1745 numComments: 0,
1746 numUpvotes: 0,
1747 commentsPermalink: `http://localhost:5002/posts/${id}`,
1748 read: false,
1749 upvoted: false,
1750 commented: false,
1751 type: PostType.Article,
1752 domain: 'example.com',
1753 hero: hero ?? null,
1754 } as Post);
1755
1756const SIGNIFICANCE_BY_SIZE: Record<number, PostHeroSignificance> = {
1757 4: 'breaking',

Callers 2

buildWidePostFunction · 0.70
Feed.spec.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected