fix: hero text priorities; prefer uiText over HeroBanner DB
Deploy Canina / deploy (push) Failing after 2m3s
Deploy Canina / deploy (push) Failing after 2m3s
This commit is contained in:
1 parent
75f35b8183
commit
a22afb11d5
1 file changed
+2
-5
@@ -65,11 +65,8 @@ import { useRouter } from 'next/navigation';
|
||||
export default function Hero({ banners = [] }: { banners?: any[] }) {
|
||||
const router = useRouter();
|
||||
const getText = useSettingsStore(state => state.getText);
|
||||
const title = banners.length > 0 ? banners[0].title : getText('hero_title', "تخصص آلمانی در خدمت\nسلامت پتهای خانگی");
|
||||
const subtitle = banners.length > 0 ? banners[0].subtitle : getText(
|
||||
'hero_desc',
|
||||
'بیش از <span className="font-bold text-canina-blue">۴۰ سال</span> تجربه نوآورانه در تولید مکملهای درمانی با بالاترین استاندارد کیفی «گرید دارویی اختصاصی». راهکار هوشمند برای هر نیاز بالینی.'
|
||||
);
|
||||
const title = getText('hero_title', '') || (banners.length > 0 ? banners[0].title : "تخصص آلمانی در خدمت\nسلامت پتهای خانگی");
|
||||
const subtitle = getText('hero_desc', '') || (banners.length > 0 ? banners[0].subtitle : 'بیش از <span className="font-bold text-canina-blue">۴۰ سال</span> تجربه نوآورانه در تولید مکملهای درمانی با بالاترین استاندارد کیفی «گرید دارویی اختصاصی». راهکار هوشمند برای هر نیاز بالینی.');
|
||||
const titleParts = title.split('\n');
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user