From 565ef70840c0c79c7866b8a277a2cf4331c933e0 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Wed, 15 Jul 2026 12:43:20 +0330 Subject: [PATCH] fix: replace onClick router.push navigation with standard next/link components for SEO accessibility --- .../components/FeaturedProducts.tsx | 14 ++----- frontend/application/components/Footer.tsx | 37 ++++++++++++------- .../application/components/VetGallery.tsx | 7 ++-- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/frontend/application/components/FeaturedProducts.tsx b/frontend/application/components/FeaturedProducts.tsx index c6e5962..42c0c0a 100644 --- a/frontend/application/components/FeaturedProducts.tsx +++ b/frontend/application/components/FeaturedProducts.tsx @@ -87,7 +87,7 @@ function ProductCard({ product, onClick }: { product: Product; key?: string | nu {/* Content Area */} -
router.push(`/shop/${product.slug || product.id}`)}> +

{product.name} @@ -108,18 +108,12 @@ function ProductCard({ product, onClick }: { product: Product; key?: string | nu
{product.price}
- +

-
+ ); } diff --git a/frontend/application/components/Footer.tsx b/frontend/application/components/Footer.tsx index ab8bd14..846c81f 100644 --- a/frontend/application/components/Footer.tsx +++ b/frontend/application/components/Footer.tsx @@ -2,6 +2,7 @@ import React from "react"; import { Phone, Mail, MapPin, Instagram, ShieldCheck, Globe } from "lucide-react"; import { useSettingsStore } from "../lib/store/settingsStore"; +import Link from "next/link"; export default function Footer({ onNavigate, onShopNavigate, onB2BOpen }: { onNavigate: (v: any) => void, @@ -16,13 +17,13 @@ export default function Footer({ onNavigate, onShopNavigate, onB2BOpen }: { {/* Brand Presence */}
-
onNavigate("home")}> +
C
Canina {getText('brand_name_fa', "ایران")} {getText('brand_subtitle', "نماینده رسمی Canina Pharma GmbH آلمان")}
-
+

{getText('footer_brand_desc', "تدارک هوشمندانه سلامت برای همراهان وفادار شما. واردکننده انحصاری مکمل‌های درمانی با گرید دارویی اختصاصی از آلمان با سابقه ۴۰ سال نوآوری.")}

@@ -39,21 +40,29 @@ export default function Footer({ onNavigate, onShopNavigate, onB2BOpen }: {

{getText('footer_links_title', "دسترسی سریع")}

    -
  • onShopNavigate()} className="hover:text-white hover:translate-x-[-4px] transition-all cursor-pointer flex items-center gap-2 group"> -
    - {getText('footer_link_products', "محصولات تخصصی ۲۰۲۴")} +
  • + +
    + {getText('footer_link_products', "محصولات تخصصی ۲۰۲۴")} +
  • -
  • onNavigate("blog")} className="hover:text-white hover:translate-x-[-4px] transition-all cursor-pointer flex items-center gap-2 group"> -
    - {getText('footer_link_blog', "مجله سلامت پت (وبلاگ)")} +
  • + +
    + {getText('footer_link_blog', "مجله سلامت پت (وبلاگ)")} +
  • -
  • onNavigate("profile")} className="hover:text-white hover:translate-x-[-4px] transition-all cursor-pointer flex items-center gap-2 group"> -
    - {getText('footer_link_profiles', "شناسنامه پتها")} +
  • + +
    + {getText('footer_link_profiles', "شناسنامه پت‌ها")} +
  • -
  • onNavigate("wiki")} className="hover:text-white hover:translate-x-[-4px] transition-all cursor-pointer flex items-center gap-2 group"> -
    - {getText('footer_link_wiki', "دانشنامه ترکیبات")} +
  • + +
    + {getText('footer_link_wiki', "دانشنامه ترکیبات")} +
  • diff --git a/frontend/application/components/VetGallery.tsx b/frontend/application/components/VetGallery.tsx index acd0ebd..7a33b89 100644 --- a/frontend/application/components/VetGallery.tsx +++ b/frontend/application/components/VetGallery.tsx @@ -2,6 +2,7 @@ import React, { useState } from "react"; import { Play, PlayCircle, Star, ShieldCheck, X } from "lucide-react"; import { motion, AnimatePresence } from "motion/react"; +import Link from "next/link"; import { useRouter } from "next/navigation"; import { useSettingsStore } from "../lib/store/settingsStore"; @@ -57,13 +58,13 @@ export default function VetGallery({ testimonials = [] }: { testimonials?: any[] {getText('videos_desc', "تیم علمی و فرموله‌کنندگان کمپانی کانینا در آلمان مستقیماً با شما صحبت می‌کنند؛ آشنایی با نحوه مصرف، مزایای بالینی و دانش پزشکی پشت هر محصول.")}

    - +