Skip to content

Commit

Permalink
init: initial router setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Geun-Oh committed Apr 5, 2024
1 parent 8e18bdf commit 456fd2d
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@types/react-router-dom": "^5.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.3"
},
"devDependencies": {
"@emotion/babel-plugin": "^11.11.0",
Expand Down
53 changes: 53 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/Router.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Home from "./pages/Home";
import B from "./pages/B";
import A from "./pages/A";

const Router = () => {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/B" element={<B />} />
<Route path="/A" element={<A />} />
</Routes>
</BrowserRouter>
);
};

export default Router;
9 changes: 9 additions & 0 deletions src/pages/A.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const A = () => {
return (
<div>
A
</div>
)
}

export default A;
9 changes: 9 additions & 0 deletions src/pages/B.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const B = () => {
return (
<div>
B
</div>
);
};

export default B;
9 changes: 9 additions & 0 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const Home = () => {
return (
<div>
Hello Daybook!
</div>
);
};

export default Home;

0 comments on commit 456fd2d

Please sign in to comment.