diff options
Diffstat (limited to 'frontend/src/main.tsx')
| -rw-r--r-- | frontend/src/main.tsx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx new file mode 100644 index 0000000..0df5185 --- /dev/null +++ b/frontend/src/main.tsx @@ -0,0 +1,35 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import { + createBrowserRouter, + RouterProvider, +} from 'react-router-dom'; +import Home from './routes/Home.tsx'; +import GolfEntry from './routes/golf/GolfEntry.tsx'; +import GolfPlay from './routes/golf/GolfPlay.tsx'; +import GolfWatch from './routes/golf/GolfWatch.tsx'; + +const router = createBrowserRouter([ + { + path: "/", + element: (<Home />), + }, + { + path: "/golf/entry/", + element: (<GolfEntry />), + }, + { + path: "/golf/:gameId/play/:playerId/", + element: (<GolfPlay />), + }, + { + path: "/golf/:gameId/watch/", + element: (<GolfWatch />), + }, +]); + +ReactDOM.createRoot(document.getElementById('root')!).render( + <React.StrictMode> + <RouterProvider router={router} /> + </React.StrictMode>, +) |
