From 90ecf392956b29e1619debfa65b939786c26c86b Mon Sep 17 00:00:00 2001
From: parsa aghaei
Date: Sat, 8 Aug 2026 18:15:53 +0330
Subject: [PATCH] fix(frontend): execute prisma db seed & resolve Hero
component SSR hydration text mismatch
---
frontend/application/components/Hero.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/frontend/application/components/Hero.tsx b/frontend/application/components/Hero.tsx
index 0d8f087e..1d1b4208 100644
--- a/frontend/application/components/Hero.tsx
+++ b/frontend/application/components/Hero.tsx
@@ -40,7 +40,7 @@ import { Banner } from "../lib/types";
export default function Hero({ banners = [] }: { banners?: Banner[] }) {
const router = useRouter();
- const getText = useSettingsStore(state => state.getText);
+ const { getText, isInitialized } = useSettingsStore();
const title = getText('hero_title', '') || (banners.length > 0 && banners[0].title ? banners[0].title : "تخصص آلمانی در خدمت\nسلامت پتهای خانگی");
const subtitle = getText('hero_desc', '') || (banners.length > 0 && banners[0].subtitle ? banners[0].subtitle : 'بیش از ۴۰ سال تجربه نوآورانه در تولید مکملهای درمانی با بالاترین استاندارد کیفی «گرید دارویی اختصاصی». راهکار هوشمند برای هر نیاز بالینی.');
const titleParts = title.split('\n');
@@ -63,7 +63,9 @@ export default function Hero({ banners = [] }: { banners?: Banner[] }) {
>
- {getText('hero_badge', "تخصص دارویی از آلمان")}
+
+ {isInitialized ? getText('hero_badge', "تخصص دارویی از آلمان") : "تخصص دارویی از آلمان"}
+