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

Function BoostName

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getPostPathFunction · 0.90
shortDateFunction · 0.85

Tested by

no test coverage detected