Skip to content

Commit

Permalink
Truncate long job summaries and add tool tip
Browse files Browse the repository at this point in the history
  • Loading branch information
shrir committed Dec 10, 2024
1 parent 1c5881a commit c5318d7
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions frontend/src/components/opportunities/OpportunityContacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,22 @@ export function OpportunityContacts({
<BriefcaseBusiness width={18} />
<p>Summary</p>
</div>
<p className="font-medium">
{contact.summary ? contact.summary : "Empty"}
</p>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<p className="-ms-1.5 line-clamp-2 hover:bg-background/50 px-1.5 rounded-md flex-1">
{contact.summary ? contact.summary : "Empty"}
</p>
</TooltipTrigger>
{contact.summary && (
<TooltipContent>
<p className="max-w-xs whitespace-normal break-words p-2 text-sm">
{contact.headline}
</p>
</TooltipContent>
)}
</Tooltip>
</TooltipProvider>
</div>

<div className="flex flex-row items-start justify-start text-sm text-zinc-700 dark:text-zinc-200">
Expand Down

0 comments on commit c5318d7

Please sign in to comment.