onst Home = () => {
const navigate = useNavigate();
navigate(/inventory);
return (
<Link to={/inventory}>
{" "}
Manage Inventories
); };export default Home;
CodePudding user response:
You have navigate("/inventory"); in the function body of your code. That is why your code goes to another page on load. To fix this, simply remove that line.
