The navbar keeps appearing twice at the top and bottom of the page. When I inspect the page the elements show that App appears twice and duplicates the nav.
App.js:
import {Outlet} from "react-router-dom";
import './App.css';
import Nav from "./components/Nav";
function App() {
return (
<div className="App">
<Nav/>
<Outlet/>
</div>
);
}
export default App;
nav.js:
import {Link} from "react-router-dom";
function Nav(){
return(
<nav>
<Link to ={"/"}>Home </Link>
<Link to ={"/data"}>Data </Link>
<Link to ={"/cool"}>Cool </Link>
</nav>
)
}
export default Nav;
published site: https://stoic-ritchie-b40b0f.netlify.app/