fix(blog): update fallback image handling, use SafeImage, and enhance related products display
Deploy Canina / deploy (push) Successful in 1m37s

This commit is contained in:
parsa aghaei committed 2026-08-24 17:49:40 +03:30
1 parent fe6a900665
commit 1ddfb0a823
14 files changed
+11087 -9377

No files matched your search

@@ -512,13 +512,13 @@ export default async function BlogPostPage({ params }: { params: Promise<{ slug:
/>
</div>
<div className="flex-1 min-w-0">
<span className="text-[10px] font-bold text-white/60 block truncate">{p.category?.name}</span>
<span className="text-[10px] font-bold text-white/60 block truncate">{p.category?.name || p.categorySlug}</span>
<h5 className="text-xs font-black text-white truncate group-hover:text-canina-gold transition-colors">
{p.nameFa}
</h5>
{p.prices?.[0]?.price && (
{(p.priceDisplay || p.priceValue || p.prices?.[0]?.price) && (
<span className="text-[11px] font-bold text-canina-gold font-mono mt-0.5 block">
{Number(p.prices[0].price).toLocaleString('fa-IR')} تومان
{p.priceDisplay || (p.priceValue ? `${Number(p.priceValue).toLocaleString('fa-IR')} تومان` : `${Number(p.prices[0].price).toLocaleString('fa-IR')} تومان`)}
</span>
)}
</div>
+1 -1
View File
@@ -58,7 +58,7 @@ async function getBlogs() {
? new Date(String(b.createdAt)).toLocaleDateString('fa-IR')
: '',
readingTime: b.readingTime || 3,
image: String(b.imageUrl || b.coverImage || 'https://images.unsplash.com/photo-1548767797-d8c844163c4c?auto=format&fit=crop&q=80&w=800'),
image: String(b.imageUrl || b.coverImage || '/assets/images/blog-placeholder.png'),
imageAlt: b.imageAlt || b.title,
author: authorName || 'نویسنده کنینا',
content: String(b.content || ''),