({ campaign }: { campaign: Campaign })
| 316 | ); |
| 317 | |
| 318 | const 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 | |
| 359 | const columns = ['Boost', 'Spend', 'Impressions', 'New members', 'Time', '']; |
| 360 |
nothing calls this directly
no test coverage detected