/**
* Challenge: Create the Vans list page, Route, and Link
*
* 1. Create a Vans component in the "pages" directory. For now,
* just render <h1>Vans page goes here 🚐</h1>
* 2. Create a Route for the Vans page on the /vans route
* 3. Add a Link in the nav bar to the Vans route
*/
function App() {
return (
<BrowserRouter>
<header>
<Link className="site-logo" to="/">#VanLife</Link>
<nav>
<Link to="/about">About</Link>
</nav>
</header>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
</Routes>
</BrowserRouter>
)
}
ReactDOM
.createRoot(document.getElementById('root'))
.render(<App />);
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter, Routes, Route, Link } from "react-router-dom"
import Home from "./pages/Home"
import About from "./pages/About"
import "./server"