minerva-juppiter-home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 6e9ac444c238d4b7f4613bdf22e16b2b4016dc08
parent e0a31343a20a5f2c1da1dc71433449ab2a63465f
Author: minerva-jupitr <ryouturn@gmail.com>
Date:   Wed,  6 Nov 2024 17:08:33 +0900

import router

Diffstat:
Mbun.lockb | 0
Mindex.html | 2+-
Mpackage.json | 3++-
Asrc/AppRoutes.tsx | 19+++++++++++++++++++
Asrc/Home.tsx | 12++++++++++++
Msrc/main.tsx | 4++--
6 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/bun.lockb b/bun.lockb Binary files differ. diff --git a/index.html b/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>Vite + React + TS</title> + <title>Minerva-Juppiter-Home</title> </head> <body> <div id="root"></div> diff --git a/package.json b/package.json @@ -11,7 +11,8 @@ }, "dependencies": { "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^6.27.0" }, "devDependencies": { "@eslint/js": "^9.14.0", diff --git a/src/AppRoutes.tsx b/src/AppRoutes.tsx @@ -0,0 +1,18 @@ +import { + BrowserRouter, + Route, + Routes + } from "react-router-dom"; + import Home from './Home'; + + const AppRoutes = () => { + return ( + <BrowserRouter> + <Routes> + <Route path='/' element={<Home />} /> + </Routes> + </BrowserRouter> + ) + } + + export default AppRoutes;+ \ No newline at end of file diff --git a/src/Home.tsx b/src/Home.tsx @@ -0,0 +1,11 @@ + + +const Home = () => { + return ( + <div> + <div>Home</div> + </div> + ) +} + +export default Home;+ \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx @@ -1,10 +1,10 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' +import AppRoutes from './AppRoutes.tsx' import './index.css' -import App from './App.tsx' createRoot(document.getElementById('root')!).render( <StrictMode> - <App /> + <AppRoutes /> </StrictMode>, )