set up routing

This commit is contained in:
MapleLeaf
2021-12-31 12:58:03 -06:00
committed by Darius
parent 235775f84a
commit ba6f9b1698
8 changed files with 62 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
import { Route, Routes } from "react-router"
import { Link } from "react-router-dom"
import { DocumentPage } from "./document-page"
import { LandingPage } from "./landing-page"
export function AppRoutes() {
return (
<>
<nav>
<Link to="/">Home</Link>
<Link to="docs/getting-started">Getting Started</Link>
<Link to="docs/api">API Reference</Link>
</nav>
<Routes>
<Route path="/" element={<LandingPage />} />
<Route path="docs/*" element={<DocumentPage />} />
</Routes>
</>
)
}