import { BrowserRouter, Routes, Route } from "react-router-dom"; import { Home, About, NotFound } from "./pages"; import Navbar from "./components/layout/Navbar"; import Footer from "./components/layout/Footer"; function App() { return ( <BrowserRouter> <div className="flex flex-col justify-between h-screen"> <Navbar /> <main className="container mx-auto px-3 pb-12"> <Routes> <Route path="/" element={<Home />} /> <Route path="/about" element={<About />} /> <Route path="/about" element={<NotFound />} /> <Route path="/*" element={<NotFound />} /> </Routes> </main> <Footer /> </div> </BrowserRouter> ); } export default App;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter