summaryrefslogtreecommitdiffhomepage
path: root/react-frontend/src/routes/index.tsx
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-06-27 17:03:05 -0400
committerrealtradam <[email protected]>2024-06-27 17:03:05 -0400
commitf8d8ff781dc78a09c0f455313bf1782eb4fba962 (patch)
treed35212dac623582bc9f4e947fe1f1435337a9200 /react-frontend/src/routes/index.tsx
parentd9a2c502e208aef7958823dbbb4d23827a57cec0 (diff)
downloadgameHolster-f8d8ff781dc78a09c0f455313bf1782eb4fba962.tar.gz
gameHolster-f8d8ff781dc78a09c0f455313bf1782eb4fba962.zip
add react router
Diffstat (limited to 'react-frontend/src/routes/index.tsx')
-rw-r--r--react-frontend/src/routes/index.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/react-frontend/src/routes/index.tsx b/react-frontend/src/routes/index.tsx
new file mode 100644
index 0000000..5fcae2b
--- /dev/null
+++ b/react-frontend/src/routes/index.tsx
@@ -0,0 +1,16 @@
+import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
+import Home from "../pages/Home";
+import Layout from "../components/Layout";
+
+export default function Index()
+{
+ return (<>
+ <Router>
+ <Routes>
+ <Route path="/" element = {<Layout/>}>
+ <Route index element={<Home />} />
+ </Route>
+ </Routes>
+ </Router>
+ </>);
+}