fix footer link open in new tab

This commit is contained in:
priyanshuvish
2025-09-22 11:45:05 +05:30
parent ecac65bf9c
commit 5f5ddb1cd6

View File

@@ -15,7 +15,6 @@ import BlackLogo14 from "../assets/BlackLogo14";
import { navigateTo } from "../App"; import { navigateTo } from "../App";
import { useState } from "react"; import { useState } from "react";
import GlobalOffices from "./GlobalOffices"; import GlobalOffices from "./GlobalOffices";
import { Link } from "react-router-dom";
const footerNavigation = { const footerNavigation = {
Explore: [ Explore: [
@@ -206,12 +205,16 @@ const FooterSection = ({
<ul className="space-y-3"> <ul className="space-y-3">
{links.map((link) => ( {links.map((link) => (
<li key={link.label}> <li key={link.label}>
<Link <a
to={link.url} href={link.url || '#'}
onClick={(e) => {
e.preventDefault();
navigateTo(link.url);
}}
className="text-[#CCCCCC] hover:text-white transition-colors duration-200 text-sm block py-1 hover:translate-x-1 transform cursor-pointer" className="text-[#CCCCCC] hover:text-white transition-colors duration-200 text-sm block py-1 hover:translate-x-1 transform cursor-pointer"
> >
{link.label} {link.label}
</Link> </a>
</li> </li>
))} ))}
</ul> </ul>
@@ -389,7 +392,7 @@ export const Footer = () => {
links={footerNavigation.Explore} links={footerNavigation.Explore}
delay={0.1} delay={0.1}
/> />
{/* Combined Services & Company */} {/* Combined Services & Company */}
<div className="space-y-8"> <div className="space-y-8">
<FooterSection <FooterSection
@@ -403,7 +406,7 @@ export const Footer = () => {
delay={0.3} delay={0.3}
/> />
</div> </div>
{/* Combined AI & ML with Resources */} {/* Combined AI & ML with Resources */}
<div className="space-y-8"> <div className="space-y-8">
<FooterSection <FooterSection
@@ -417,13 +420,13 @@ export const Footer = () => {
delay={0.5} delay={0.5}
/> />
</div> </div>
<FooterSection <FooterSection
title="Solutions" title="Solutions"
links={footerNavigation.Solutions} links={footerNavigation.Solutions}
delay={0.6} delay={0.6}
/> />
<FooterSection <FooterSection
title="Hire Talent" title="Hire Talent"
links={footerNavigation.HireTalent} links={footerNavigation.HireTalent}