fix: hero image configurable via uiText + seed no longer overwrites admin values
- Hero.tsx reads hero_image_url from uiText store first, falls back to banners then default - Seed script now only creates keys that don't exist (no overwrite) - Added hero_image_url key to seed + admin panel UI texts groups - Reverted DEFAULT_TEXTS initialization (caused hydration mismatch) - settingsStore back to empty init, fetchSettings populates from API
This commit is contained in:
1 parent
53301705da
commit
40d750ad4b
3 files changed
+7
-6
No files matched your search
@@ -138,7 +138,7 @@ export default function Hero({ banners = [] }: { banners?: any[] }) {
|
||||
>
|
||||
<div className="aspect-square bg-gradient-to-br from-slate-200 to-slate-300 rounded-[2rem] overflow-hidden border-4 border-white shadow-2xl relative">
|
||||
<img
|
||||
src={banners.length > 0 && banners[0].imageUrl ? banners[0].imageUrl : "/assets/images/hero-section-image.png"}
|
||||
src={getText('hero_image_url', '') || (banners.length > 0 && banners[0].imageUrl ? banners[0].imageUrl : "/assets/images/hero-section-image.png")}
|
||||
alt={banners.length > 0 ? banners[0].title : "Canina Pharma Germany"}
|
||||
className="w-full h-full object-cover"
|
||||
loading="eager"
|
||||
|
||||
Reference in new issue
Block a user