Refactor search result layout

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 14:50:19 +00:00
parent 2907319e45
commit 7581ba053b

View File

@@ -274,14 +274,16 @@ export function AutocompleteSearch({
) : ( ) : (
<> <>
<div className="flex-1 min-w-0"> <div className="flex-1 min-w-0">
<div className="flex items-center gap-2 mb-1"> <div className="flex items-center justify-between gap-2">
<span className="font-semibold text-foreground truncate">{item.title}</span> <div className="flex items-center gap-2 min-w-0">
<Badge variant="outline" className={`text-xs font-medium ${getTypeColor(item.type)}`}> <span className="font-semibold text-foreground truncate">{item.title}</span>
{getTypeLabel(item.type)} <Badge variant="outline" className={`text-xs font-medium ${getTypeColor(item.type)}`}>
</Badge> {getTypeLabel(item.type)}
</div> </Badge>
<div className="text-sm text-muted-foreground/80 truncate mt-0.5 leading-relaxed"> </div>
{item.subtitle} <div className="text-sm text-muted-foreground/80 truncate leading-relaxed flex-shrink-0">
{item.subtitle}
</div>
</div> </div>
</div> </div>
{(item as SearchResult).rating && (item as SearchResult).rating! > 0 && ( {(item as SearchResult).rating && (item as SearchResult).rating! > 0 && (