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

Function buildPost

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

Source from the content-addressed store, hash-verified

1835const sourceFixture = defaultFeedPage.edges[0].node.source;
1836
1837const buildPost = (id: string, hero?: PostHero | null): Post =>
1838 ({
1839 id,
1840 title: `Post ${id}`,
1841 createdAt: '2026-05-25T00:00:00.000Z',
1842 image: 'https://daily.dev/img.png',
1843 readTime: 1,
1844 source: sourceFixture,
1845 tags: [],
1846 permalink: `http://localhost:4000/r/${id}`,
1847 numComments: 0,
1848 numUpvotes: 0,
1849 commentsPermalink: `http://localhost:5002/posts/${id}`,
1850 read: false,
1851 upvoted: false,
1852 commented: false,
1853 type: PostType.Article,
1854 domain: 'example.com',
1855 hero: hero ?? null,
1856 } as Post);
1857
1858const SIGNIFICANCE_BY_SIZE: Record<number, PostHeroSignificance> = {
1859 4: 'breaking',

Callers 2

buildWidePostFunction · 0.70
Feed.spec.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected