mirror of
https://github.com/ershisan99/podcaster.git
synced 2026-01-28 12:35:20 +00:00
chore: set up routing with mock pages
This commit is contained in:
23
src/router.tsx
Normal file
23
src/router.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||
import { Home } from "./pages/home";
|
||||
import { Podcast } from "./pages/podcast";
|
||||
import { Episode } from "./pages/episode";
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: "/",
|
||||
element: <Home />,
|
||||
},
|
||||
{
|
||||
path: "/podcast/:podcastId",
|
||||
element: <Podcast />,
|
||||
},
|
||||
{
|
||||
path: "/podcast/:podcastId/episode/:episodeId",
|
||||
element: <Episode />,
|
||||
},
|
||||
]);
|
||||
|
||||
export function Router() {
|
||||
return <RouterProvider router={router} />;
|
||||
}
|
||||
Reference in New Issue
Block a user