fix(catalog): add fallback to local seed data for images and medicines

- Import `diseaseCatalogSeed` to use as a fallback data source in `catalog-page.tsx`.
- Implement logic to merge backend API responses with local seed data, ensuring `imageUrl` and `medicineRecommendations` are populated.
- Fix an issue where disease images and specific treatments were not rendering due to missing fields in the database payload.
- Enhance UI resilience by displaying accurate visual and medical data without requiring immediate backend updates.
- Convert static PNG image assets to WebP format and remove old PNG files to significantly reduce image payload size and improve page load performance.
- Enhance overall UI resilience and frontend speed.
This commit is contained in:
seriouselly
2026-06-14 19:28:19 +07:00
parent bc58b16ddd
commit 8d342e1269
8 changed files with 344 additions and 205 deletions
+1 -1
View File
@@ -304,7 +304,7 @@ export function ScanPage() {
<div className="mt-4">
<div className="rounded-lg overflow-hidden mt-4">
<div className="relative h-36 overflow-hidden bg-[url('/src/assets/images/scan-guide-bg.png')] bg-cover bg-center text-white md:h-44">
<div className="relative h-36 overflow-hidden bg-[url('/src/assets/images/scan-guide-bg.webp')] bg-cover bg-center text-white md:h-44">
<div className="absolute inset-0 bg-black/25" />
<div className="absolute inset-0 bg-linear-to-b from-black/5 via-transparent to-black/35" />
<div className="relative z-10 flex h-full flex-col items-center justify-center gap-5 text-center">