Update AI search and compare pages
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -58,12 +59,12 @@ function getRiskLabel(risk?: RiskLevel): string {
|
||||
interface CompareRow {
|
||||
label: string
|
||||
getValue: (p: Property) => string | number | null
|
||||
format?: (v: string | number | null, p: Property) => React.ReactNode
|
||||
format?: (v: string | number | null, p: Property) => ReactNode
|
||||
isHigherBetter?: boolean
|
||||
isLowerBetter?: boolean
|
||||
}
|
||||
|
||||
function NumericCell({ value, isBest }: { value: React.ReactNode; isBest: boolean }) {
|
||||
function NumericCell({ value, isBest }: { value: ReactNode; isBest: boolean }) {
|
||||
return (
|
||||
<TableCell
|
||||
sx={{
|
||||
@@ -92,7 +93,7 @@ export default function Compare() {
|
||||
// Keep ordering same as tray
|
||||
const orderedProperties = compareTray
|
||||
.map(id => compareProperties.find(p => p.id === id))
|
||||
.filter((p): p is Property => p !== null)
|
||||
.filter((p): p is Property => p !== undefined)
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user