From 90c377392086141e55ed9dd00fc476aa68407b87 Mon Sep 17 00:00:00 2001 From: priyanshuvish Date: Mon, 16 Mar 2026 13:45:47 +0530 Subject: [PATCH] resource>blog cliclj go on another tab blog --- components/Navigation.tsx | 60 +++++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/components/Navigation.tsx b/components/Navigation.tsx index c43e500..99757bc 100644 --- a/components/Navigation.tsx +++ b/components/Navigation.tsx @@ -461,7 +461,13 @@ const navigationData = { { text: "Careers", icon: Briefcase, href: "/company/careers" }, ], resources: [ - { text: "Blogs", icon: BookOpen, href: "/resources/blog" }, + { + text: "Blogs", + icon: BookOpen, + href: "https://www.wdipl.com/blog", + target: "_blank", + rel: "noopener noreferrer" + }, { text: "Portfolio", icon: FileText, href: "/case-studies" }, { text: "Client Testimonials", @@ -618,8 +624,12 @@ const MegaMenu = ({ if (!isOpen) return null; - const handleNavigate = (path: string) => { - navigate(path); + const handleNavigate = (path: string, target?: string) => { + if (target === "_blank") { + window.open(path, "_blank", "noopener,noreferrer"); + } else { + navigate(path); + } onClose(); }; @@ -639,7 +649,7 @@ const MegaMenu = ({ className="font-semibold text-white text-sm cursor-pointer hover:text-[#E5195E] transition-colors" onClick={(e) => { e.preventDefault(); - service.href && handleNavigate(service.href); + handleNavigate(service.href); }} > {service.category} @@ -653,7 +663,7 @@ const MegaMenu = ({ className="text-[#CCCCCC] hover:text-white text-sm transition-colors duration-200 block py-1 hover:translate-x-1 transform text-left w-full" onClick={(e) => { e.preventDefault(); - subService.href && handleNavigate(subService.href); + handleNavigate(subService.href); }} > {subService.name} @@ -685,7 +695,7 @@ const MegaMenu = ({ className="font-semibold text-white text-lg cursor-pointer hover:text-[#E5195E] transition-colors" onClick={(e) => { e.preventDefault(); - category.href && handleNavigate(category.href); + handleNavigate(category.href); }} > {category.category} @@ -699,7 +709,7 @@ const MegaMenu = ({ className="text-[#CCCCCC] hover:text-white text-sm transition-colors duration-200 block py-1 hover:translate-x-1 transform text-left w-full" onClick={(e) => { e.preventDefault(); - service.href && handleNavigate(service.href); + handleNavigate(service.href); }} > {service.name} @@ -727,7 +737,7 @@ const MegaMenu = ({ className="flex items-center gap-4 text-[#CCCCCC] hover:text-white transition-all duration-200 p-4 rounded-lg hover:bg-white/5 group w-full text-left" onClick={(e) => { e.preventDefault(); - solution.href && handleNavigate(solution.href); + handleNavigate(solution.href); }} >
@@ -765,7 +775,7 @@ const MegaMenu = ({ className="text-[#CCCCCC] hover:text-white text-sm transition-colors duration-200 block py-1 hover:translate-x-1 transform text-left w-full" onClick={(e) => { e.preventDefault(); - item.href && handleNavigate(item.href); + handleNavigate(item.href); }} > {item.name} @@ -790,10 +800,12 @@ const MegaMenu = ({ { e.preventDefault(); - item.href && handleNavigate(item.href); + handleNavigate(item.href, item.target); }} >
@@ -969,8 +981,12 @@ export const Navigation = () => { } }; - const handleNavigation = (path: string) => { - navigate(path); + const handleNavigation = (path: string, target?: string) => { + if (target === "_blank") { + window.open(path, "_blank", "noopener,noreferrer"); + } else { + navigate(path); + } setIsMobileMenuOpen(false); setActiveMenu(null); }; @@ -1084,6 +1100,26 @@ export const Navigation = () => { {item} ))} + + {/* Mobile Resources Submenu */} +
+ {navigationData.resources.map((resource) => ( + { + e.preventDefault(); + handleNavigation(resource.href, resource.target); + }} + > + {resource.text} {resource.target === "_blank" && "↗"} + + ))} +
+