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

Function BoostName

packages/shared/src/features/boost/BoostManager.tsx:318–357  ·  view source on GitHub ↗
({ campaign }: { campaign: Campaign })

Source from the content-addressed store, hash-verified

316 );
317
318const BoostName = ({ campaign }: { campaign: Campaign }): ReactElement => {
319 const { post, source } = campaign;
320 const isPost = campaign.type === CampaignType.Post;
321 const image = isPost
322 ? (post?.sharedPost?.image ?? post?.image)
323 : source?.image;
324 const title = isPost
325 ? (post?.title ?? post?.sharedPost?.title)
326 : source?.name;
327 const href = isPost && post ? getPostPath(post) : source?.permalink;
328
329 return (
330 <span className="flex min-w-0 items-center gap-3">
331 <Image
332 src={image}
333 alt=""
334 className={classNames(
335 'hidden h-8 shrink-0 object-cover tablet:block',
336 isPost ? 'w-12 rounded-8' : 'w-8 rounded-full',
337 )}
338 />
339 <span className="flex min-w-0 flex-1 flex-col">
340 {href ? (
341 <Link href={href} passHref>
342 <a className="line-clamp-2 font-bold typo-footnote hover:underline laptop:truncate">
343 {title}
344 </a>
345 </Link>
346 ) : (
347 <span className="line-clamp-2 font-bold typo-footnote laptop:truncate">
348 {title}
349 </span>
350 )}
351 <span className="truncate text-text-tertiary typo-caption1">
352 {shortDate(campaign.createdAt)} – {shortDate(campaign.endedAt)}
353 </span>
354 </span>
355 </span>
356 );
357};
358
359const columns = ['Boost', 'Spend', 'Impressions', 'New members', 'Time', ''];
360

Callers

nothing calls this directly

Calls 2

getPostPathFunction · 0.90
shortDateFunction · 0.85

Tested by

no test coverage detected