feat(products): remove mock static fallbacks and add dynamic specialist recommendation management in database and admin panel
This commit is contained in:
1 parent
1ca06d5740
commit
00839017ff
7 files changed
+216
-66
No files matched your search
@@ -495,19 +495,34 @@ export default function CatalogPageSpread({
|
||||
)}
|
||||
|
||||
{/* Specialist Endorsement */}
|
||||
{product.specialist && (
|
||||
{product.specialist && product.specialist.name && (
|
||||
<div className="bg-white border border-slate-200/80 rounded-xl p-2 flex items-center gap-2 shrink-0 shadow-3xs">
|
||||
<div className="w-7 h-7 rounded-full bg-canina-blue/10 border border-canina-blue/20 text-canina-blue flex items-center justify-center font-black text-xs font-mono shadow-3xs shrink-0">
|
||||
<Stethoscope className="w-3.5 h-3.5" />
|
||||
<div className="w-7 h-7 rounded-full bg-canina-blue/10 border border-canina-blue/20 text-canina-blue flex items-center justify-center font-black text-xs font-mono shadow-3xs shrink-0 overflow-hidden">
|
||||
{product.specialist.image ? (
|
||||
<img
|
||||
src={product.specialist.image}
|
||||
alt={product.specialist.name}
|
||||
className="w-full h-full object-cover"
|
||||
onError={(e) => {
|
||||
(e.target as HTMLElement).style.display = 'none';
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Stethoscope className="w-3.5 h-3.5" />
|
||||
)}
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-1 truncate">
|
||||
<span className="text-[8.5px] font-black text-slate-900 truncate">{product.specialist.name}</span>
|
||||
<span className="text-[7.5px] text-slate-500 truncate font-medium">({product.specialist.title})</span>
|
||||
{product.specialist.title && (
|
||||
<span className="text-[7.5px] text-slate-500 truncate font-medium">({product.specialist.title})</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-[8px] text-slate-600 italic truncate mt-0.2">
|
||||
«{product.specialist.message}»
|
||||
</p>
|
||||
{product.specialist.message && (
|
||||
<p className="text-[8px] text-slate-600 italic truncate mt-0.2">
|
||||
«{product.specialist.message}»
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user