need help, I have a problem. I want to make it so that when one arrow(Top) disappears, another appears(down).
here is my code
return (
<div>
<Header />
<FaChevronDown className='flachDown' onClick={(e) => {
handleScrollDown();
handleShow();
if (!handleScrollUp) {
{ e.target.style.display = 'block' }
} else {
{ e.target.style.display = 'none' }
}
}} />
{isShown && (
<FaChevronUp className='flachUp' onClick={(a) => {
handleScrollUp();
handleShow();
if (!handleScrollDown) {
{ a.target.style.display = 'none' }
} else {
{ a.target.style.display = 'block' }
}
}} />
)}
<Body />
</div>
);
create a state variable : import React ,{useState} from "react"; [visible,setVisible]=useState(false); change it depending on the event that you want