fyliu Claude Opus 4.6 commited on
Commit
c663e8e
·
1 Parent(s): 57ee429

Restyle cheap flights cards to prevent name/price overlap

Browse files

Use stacked layout: city name on top, country + price on a second row.
Removes the badge and horizontal layout that caused truncation issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. frontend/src/pages/SearchPage.tsx +5 -13
frontend/src/pages/SearchPage.tsx CHANGED
@@ -303,20 +303,12 @@ export default function SearchPage({ geo }: Props) {
303
  <button
304
  key={dest.iata}
305
  onClick={() => handleDestinationClick(dest)}
306
- className="flex items-center gap-3 rounded-xl border border-gray-200 bg-white px-4 py-3 text-left hover:shadow-md transition-shadow cursor-pointer"
307
  >
308
- {/* City initial badge */}
309
- <div className={`h-10 w-10 rounded-lg flex items-center justify-center text-white font-semibold text-sm flex-shrink-0 ${getBadgeColor(dest.iata)}`}>
310
- {dest.city.charAt(0)}
311
- </div>
312
- <div className="flex-1 min-w-0">
313
- <div className="text-sm font-medium text-gray-900">
314
- {dest.city}
315
- </div>
316
- <div className="text-xs text-gray-500">{dest.country}</div>
317
- </div>
318
- <div className="text-sm font-medium text-gray-900 flex-shrink-0 ml-1">
319
- {formatPrice(dest.price_usd)}
320
  </div>
321
  </button>
322
  ))}
 
303
  <button
304
  key={dest.iata}
305
  onClick={() => handleDestinationClick(dest)}
306
+ className="rounded-xl border border-gray-200 bg-white px-4 py-3 text-left hover:shadow-md transition-shadow cursor-pointer"
307
  >
308
+ <div className="text-sm font-medium text-gray-900">{dest.city}</div>
309
+ <div className="flex items-center justify-between mt-0.5">
310
+ <span className="text-xs text-gray-500">{dest.country}</span>
311
+ <span className="text-sm font-medium text-[#1a73e8]">{formatPrice(dest.price_usd)}</span>
 
 
 
 
 
 
 
 
312
  </div>
313
  </button>
314
  ))}