Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
How to prioritize a link button in a link div in React JS

I am making a site and I am having some troubles with a button, it's inside a link div but when I Click the button, insted it takes me to the button link it takes me to the div link.

 import { Link } from "react-router-dom";

 <Link to={'/seminovos/'+ carItem.name}> 
   <div className="carItem">
    <div className="carBackground"> <img src={image} alt=''/> </div>
    <h1 className="carName"> {name} </h1>
    <p> {year} - {km}</p>
    <p className="carPrice"> ${price} </p> 
    <a className="consultarA" href="https://web.whatsapp.com/send?phone=**********" 
    target="_blank">
     <button className="contato"> Conversar com Vendedor </button>
    </a></div>
  </Link>

How can i make this button works ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use event.stopPropagation() to do that

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!