feat: F010 unified result feed
Replace monolithic Results.tsx with decomposed component architecture: - 8 new components in src/components/results/ (ResultTypeBadge, ResultConfidenceSummary, FeedEmptyState, FeedSkeleton, ResultFeedHeader, ResultFilterBar, UnifiedResultCard, UnifiedResultFeed) - Reuses existing useUnifiedResults hook and compareStore - FUTURE_AVAILABILITY cards always display non-dismissable disclaimer - Filter by result type + sort by score/area/rent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import type { UnifiedMatchResult } from '../../domain/unifiedResult'
|
||||
import { UnifiedResultCard } from './UnifiedResultCard'
|
||||
|
||||
interface Props {
|
||||
results: UnifiedMatchResult[]
|
||||
isInCompare: (id: string) => boolean
|
||||
onCompare: (propertyId: string) => void
|
||||
}
|
||||
|
||||
export function UnifiedResultFeed({ results, isInCompare, onCompare }: Props) {
|
||||
return (
|
||||
<>
|
||||
{results.map(result => {
|
||||
const compareId =
|
||||
result.resultType !== 'FUTURE_AVAILABILITY'
|
||||
? (result as { property: { id: string } }).property.id
|
||||
: ''
|
||||
return (
|
||||
<UnifiedResultCard
|
||||
key={result.matchId}
|
||||
result={result}
|
||||
isInCompare={compareId ? isInCompare(compareId) : false}
|
||||
onCompare={onCompare}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user