I am having this problem since a while. Whenever I am trying to click a link and call the onclick function all the other onclick function gets called. I dont know how is this happening
<li className={activepage==="dashboard"?'active':''} onClick={changePage("dashboard")} >
<a href="#">
<i className="fa fa-dashboard fa-lg" /> Dashboard
</a>
</li>
<li data-toggle="collapse" data-target="#products" className={activepage==="entries"?'active':''} onClick={changepage("entries")}>
<a href="#" >
<i className="fa fa-gift fa-lg" />Entries <i className="fas fa-down-arrow" />
<span className="arrow" />
</a>
</li>
I am having this problem for a white and i cant find a solution