Added a badge to "Your recommendation" items that have 1-click subscribe

refs  https://github.com/TryGhost/Product/issues/3888
This commit is contained in:
Djordje Vlaisavljevic 2023-09-19 12:58:35 +01:00
parent 5e466a90be
commit 8af7b022fd

View File

@ -29,9 +29,10 @@ const RecommendationItem: React.FC<{recommendation: Recommendation}> = ({recomme
<TableCell onClick={showDetails}>
<div className='group flex items-center gap-3 hover:cursor-pointer'>
<div className={`flex grow flex-col`}>
<div className="mb-1 flex items-center gap-2">
<div className="mb-0.5 flex items-center gap-2">
<RecommendationIcon {...recommendation} />
<span className='line-clamp-1'>{recommendation.title}</span>
<span className='line-clamp-1 font-medium'>{recommendation.title}</span>
{showSubscribes && <span className='-mb-px inline-flex h-[19px] shrink-0 items-center rounded-full bg-grey-200 px-1.5 py-0.5 text-2xs font-semibold uppercase tracking-wide text-grey-700'>1-click subscribe</span>}
</div>
<span className='line-clamp-1 text-xs leading-snug text-grey-700'>{recommendation.reason || 'No reason added'}</span>
</div>