route parmeters (#221)

This commit is contained in:
Michael Quigley 2024-10-08 14:47:21 -04:00
parent c5c5bb0879
commit f0cd66dbe2
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 6 additions and 2 deletions

View File

@ -1,10 +1,14 @@
import NavBar from "./NavBar.jsx";
import {useParams} from "react-router-dom";
function ShareDetail() {
let params = useParams();
return (
<>
<NavBar />
<h1>Share Detail</h1>
<h1>Share {params.token}</h1>
</>
)
}

View File

@ -11,7 +11,7 @@ const router = createBrowserRouter([
element: <Overview />
},
{
path: "/share",
path: "/share/:token",
element: <ShareDetail />
}
]);