text wrapping

This commit is contained in:
DaKheera47 2025-12-15 00:54:52 +00:00
parent 3056369a75
commit 77b23317b8
2 changed files with 12 additions and 9 deletions

View File

@ -96,13 +96,16 @@ const compareJobs = (a: Job, b: Job, sort: JobSort) => {
value = statusRank[a.status] - statusRank[b.status];
break;
case "score":
if (a.suitabilityScore == null && b.suitabilityScore == null) {
const aScore = a.suitabilityScore;
const bScore = b.suitabilityScore;
if (aScore == null && bScore == null) {
value = 0;
break;
}
if (a.suitabilityScore == null) return 1;
if (b.suitabilityScore == null) return -1;
value = compareNumber(a.suitabilityScore, b.suitabilityScore);
if (aScore == null) return 1;
if (bScore == null) return -1;
value = compareNumber(aScore, bScore);
break;
case "discoveredAt":
value = compareNullable(dateValue(a.discoveredAt), dateValue(b.discoveredAt), compareNumber);

View File

@ -181,12 +181,12 @@ export const JobTable: React.FC<JobTableProps> = ({
return (
<TableRow key={job.id}>
<TableCell className="max-w-[520px]">
<TableCell className="align-top">
<Button
asChild
variant="link"
size="sm"
className="h-auto justify-start p-0 text-left leading-snug"
className="h-auto justify-start p-0 text-left leading-snug whitespace-normal break-words"
>
<a href={jobLink} target="_blank" rel="noopener noreferrer">
{job.title}
@ -194,8 +194,8 @@ export const JobTable: React.FC<JobTableProps> = ({
</Button>
</TableCell>
<TableCell className="max-w-[320px] truncate">
<span className="truncate">{job.employer}</span>
<TableCell className="align-top whitespace-normal break-words">
{job.employer}
</TableCell>
<TableCell>
@ -204,7 +204,7 @@ export const JobTable: React.FC<JobTableProps> = ({
</Badge>
</TableCell>
<TableCell className="max-w-[260px] truncate text-muted-foreground">
<TableCell className="align-top whitespace-normal break-words text-muted-foreground">
{job.location || "—"}
</TableCell>