fix(admin,frontend): fix hydration mismatch, admin UI texts sync, and product image resolution
Deploy Canina / deploy (push) Failing after 1s
Deploy Canina / deploy (push) Failing after 1s
This commit is contained in:
1 parent
3122c5b13f
commit
5ec99155c4
7 files changed
+103
-31
No files matched your search
@@ -121,9 +121,11 @@ export class ProductService {
|
||||
optimisticTemplate: data.optimisticTemplate,
|
||||
feedingAdvice: data.dosageLogic || data.feedingAdvice || '',
|
||||
slug: data.slug,
|
||||
image: (data.imageUrl && data.imageUrl.startsWith('http'))
|
||||
? data.imageUrl
|
||||
: (local?.image || (data.imageUrl ? `/api${data.imageUrl}` : data.image || '')),
|
||||
image: (data.imageUrl && (data.imageUrl.startsWith('http://') || data.imageUrl.startsWith('https://')))
|
||||
? data.imageUrl
|
||||
: (data.imageUrl && data.imageUrl.startsWith('/uploads/')
|
||||
? data.imageUrl
|
||||
: (local?.image || (data.imageUrl && !data.imageUrl.startsWith('/products/') ? data.imageUrl : '') || '/assets/images/hero-section-image.png')),
|
||||
|
||||
main_ingredients: data.ingredientList?.map(i => i.ingredient) || data.ingredients?.split(/[،,-]/).map(s => s.trim()).filter(Boolean) || [],
|
||||
symptoms: data.symptoms?.map(s => typeof s === 'string' ? s : s.symptom || '').filter(Boolean) || [],
|
||||
|
||||
Reference in new issue
Block a user