fix: resolve footer email typo, unify assistant naming, add German scientific team context, add tooltips definitions, and optimize homepage featured products category diversity
This commit is contained in:
1 parent
67d6f71d7a
commit
a92b1a61ff
5 files changed
+39
-7
No files matched your search
@@ -57,7 +57,7 @@ export default function Footer({ onNavigate, onShopNavigate, onB2BOpen }: {
|
|||||||
</li>
|
</li>
|
||||||
<li onClick={onB2BOpen} className="hover:text-canina-blue hover:translate-x-[-4px] transition-all cursor-pointer flex items-center gap-2 group text-blue-200">
|
<li onClick={onB2BOpen} className="hover:text-canina-blue hover:translate-x-[-4px] transition-all cursor-pointer flex items-center gap-2 group text-blue-200">
|
||||||
<div className="w-1.5 h-1.5 rounded-full bg-canina-blue group-hover:w-4 transition-all" />
|
<div className="w-1.5 h-1.5 rounded-full bg-canina-blue group-hover:w-4 transition-all" />
|
||||||
{getText('footer_link_b2b', "پنل سفارش عمده (B2B)")}
|
{getText('footer_link_b2b', "همکاری با کلینیکها و پتشاپها (B2B)")}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -82,7 +82,7 @@ export default function Footer({ onNavigate, onShopNavigate, onB2BOpen }: {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-[11px] text-slate-400 font-extrabold uppercase mb-1">{getText('footer_email_label', "مکاتبات رسمی")}</p>
|
<p className="text-[11px] text-slate-400 font-extrabold uppercase mb-1">{getText('footer_email_label', "مکاتبات رسمی")}</p>
|
||||||
<p className="text-sm font-bold text-slate-300">{getText('footer_email', "info@canino-iran.com")}</p>
|
<p className="text-sm font-bold text-slate-300">{getText('footer_email', "info@canina-iran.com")}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export default function Hero({ banners = [] }: { banners?: any[] }) {
|
|||||||
}}
|
}}
|
||||||
className="bg-canina-blue text-white px-10 py-5 rounded-full font-bold text-lg hover:bg-canina-blue/90 hover:shadow-2xl focus-visible:ring-4 focus-visible:ring-canina-blue/30 focus-visible:outline-none transition-all flex items-center gap-2 group font-vazir min-h-[58px] shadow-lg shadow-canina-blue/20 cursor-pointer"
|
className="bg-canina-blue text-white px-10 py-5 rounded-full font-bold text-lg hover:bg-canina-blue/90 hover:shadow-2xl focus-visible:ring-4 focus-visible:ring-canina-blue/30 focus-visible:outline-none transition-all flex items-center gap-2 group font-vazir min-h-[58px] shadow-lg shadow-canina-blue/20 cursor-pointer"
|
||||||
>
|
>
|
||||||
{getText('hero_btn_advisor', "دستیار سلامت پت")}
|
{getText('hero_btn_advisor', "دستیار سلامت کانینا")}
|
||||||
<ChevronLeft className="w-5 h-5 group-hover:-translate-x-1 transition-transform" />
|
<ChevronLeft className="w-5 h-5 group-hover:-translate-x-1 transition-transform" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ export default function VetGallery({ testimonials = [] }: { testimonials?: any[]
|
|||||||
{getText('videos_title', "مشاوره ویدئویی")} <span className="text-canina-blue underline decoration-4 decoration-canina-blue/20 underline-offset-8">{getText('videos_title_highlight', "دوست دامپزشک پت شما")}</span>
|
{getText('videos_title', "مشاوره ویدئویی")} <span className="text-canina-blue underline decoration-4 decoration-canina-blue/20 underline-offset-8">{getText('videos_title_highlight', "دوست دامپزشک پت شما")}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-lg text-medical-gray-500 font-medium mt-6">
|
<p className="text-lg text-medical-gray-500 font-medium mt-6">
|
||||||
{getText('videos_desc', "متخصصین آلمانی کانینا مستقیماً با شما صحبت میکنند. نحوه مصرف، مزایای رقابتی و دانش تخصصی پشت هر محصول.")}
|
{getText('videos_desc', "تیم علمی و فرمولهکنندگان کمپانی کانینا در آلمان مستقیماً با شما صحبت میکنند؛ آشنایی با نحوه مصرف، مزایای بالینی و دانش پزشکی پشت هر محصول.")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
onClick={() => router.push('/videos')}
|
onClick={() => router.push('/videos')}
|
||||||
|
|||||||
@@ -129,5 +129,17 @@ export const SCIENTIFIC_TERMS: Record<string, ScientificTerm> = {
|
|||||||
term: "تورین (Taurine)",
|
term: "تورین (Taurine)",
|
||||||
definition: "آمینو اسید بسیار ضروری برای گربهها جهت جلوگیری از دژنراسیون شبکیه (نابینایی) و نارسایی قلبی.",
|
definition: "آمینو اسید بسیار ضروری برای گربهها جهت جلوگیری از دژنراسیون شبکیه (نابینایی) و نارسایی قلبی.",
|
||||||
wikiId: "taurin"
|
wikiId: "taurin"
|
||||||
|
},
|
||||||
|
"گرید دارویی": {
|
||||||
|
term: "گرید دارویی (Pharmaceutical Grade)",
|
||||||
|
definition: "بالاترین سطح خلوص مواد اولیه؛ تهیه شده با استانداردهای دارویی انسان و کاملاً بیخطر در صورت لیسیده شدن توسط حیوان."
|
||||||
|
},
|
||||||
|
"IFS": {
|
||||||
|
term: "استاندارد بینالمللی IFS",
|
||||||
|
definition: "سختگیرانهترین استاندارد ایمنی و کیفیت محصولات دارویی و غذایی در اروپا."
|
||||||
|
},
|
||||||
|
"HACCP": {
|
||||||
|
term: "سیستم کنترل بحران HACCP",
|
||||||
|
definition: "تضمینکننده عدم وجود هرگونه آلودگی فیزیکی، شیمیایی یا میکروبی در زنجیره تولید محصولات."
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -127,8 +127,28 @@ export class ProductService {
|
|||||||
|
|
||||||
public async getFeaturedProducts(): Promise<Product[]> {
|
public async getFeaturedProducts(): Promise<Product[]> {
|
||||||
try {
|
try {
|
||||||
const response = await api.get('/products');
|
const response = await api.get('/products?limit=30');
|
||||||
return response.data.data.slice(0, 4).map((item: any) => this.mapBackendToFrontend(item));
|
const all = response.data.data.map((item: any) => this.mapBackendToFrontend(item));
|
||||||
|
const featured: Product[] = [];
|
||||||
|
const categoriesSeen = new Set<string>();
|
||||||
|
|
||||||
|
for (const p of all) {
|
||||||
|
if (p.category && !categoriesSeen.has(p.category)) {
|
||||||
|
featured.push(p);
|
||||||
|
categoriesSeen.add(p.category);
|
||||||
|
}
|
||||||
|
if (featured.length === 4) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (featured.length < 4) {
|
||||||
|
for (const p of all) {
|
||||||
|
if (!featured.some(f => f.id === p.id)) {
|
||||||
|
featured.push(p);
|
||||||
|
}
|
||||||
|
if (featured.length === 4) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return featured;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[ProductService] Failed to fetch featured products:", error);
|
console.error("[ProductService] Failed to fetch featured products:", error);
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in new issue
Block a user