diff --git a/package.json b/package.json index 1d63571..4ec0867 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef0ed77..ef4931f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,12 +11,18 @@ dependencies: '@emotion/styled': specifier: ^11.11.5 version: 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.74)(react@18.2.0) + '@types/react-router-dom': + specifier: ^5.3.3 + version: 5.3.3 react: specifier: ^18.2.0 version: 18.2.0 react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + react-router-dom: + specifier: ^6.22.3 + version: 6.22.3(react-dom@18.2.0)(react@18.2.0) devDependencies: '@emotion/babel-plugin': @@ -688,6 +694,11 @@ packages: fastq: 1.17.1 dev: true + /@remix-run/router@1.15.3: + resolution: {integrity: sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==} + engines: {node: '>=14.0.0'} + dev: false + /@rollup/rollup-android-arm-eabi@4.14.0: resolution: {integrity: sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w==} cpu: [arm] @@ -937,6 +948,10 @@ packages: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true + /@types/history@4.7.11: + resolution: {integrity: sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==} + dev: false + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -953,6 +968,21 @@ packages: '@types/react': 18.2.74 dev: true + /@types/react-router-dom@5.3.3: + resolution: {integrity: sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==} + dependencies: + '@types/history': 4.7.11 + '@types/react': 18.2.74 + '@types/react-router': 5.1.20 + dev: false + + /@types/react-router@5.1.20: + resolution: {integrity: sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==} + dependencies: + '@types/history': 4.7.11 + '@types/react': 18.2.74 + dev: false + /@types/react@18.2.74: resolution: {integrity: sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==} dependencies: @@ -1938,6 +1968,29 @@ packages: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: false + /react-router-dom@6.22.3(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: '>=16.8' + react-dom: '>=16.8' + dependencies: + '@remix-run/router': 1.15.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-router: 6.22.3(react@18.2.0) + dev: false + + /react-router@6.22.3(react@18.2.0): + resolution: {integrity: sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: '>=16.8' + dependencies: + '@remix-run/router': 1.15.3 + react: 18.2.0 + dev: false + /react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} diff --git a/src/Router.tsx b/src/Router.tsx new file mode 100644 index 0000000..aa86f97 --- /dev/null +++ b/src/Router.tsx @@ -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 ( + + + } /> + } /> + } /> + + + ); + }; + +export default Router; \ No newline at end of file diff --git a/src/pages/A.tsx b/src/pages/A.tsx new file mode 100644 index 0000000..9cc3cba --- /dev/null +++ b/src/pages/A.tsx @@ -0,0 +1,9 @@ +const A = () => { + return ( +
+ A +
+ ) +} + +export default A; \ No newline at end of file diff --git a/src/pages/B.tsx b/src/pages/B.tsx new file mode 100644 index 0000000..8c7566f --- /dev/null +++ b/src/pages/B.tsx @@ -0,0 +1,9 @@ +const B = () => { + return ( +
+ B +
+ ); +}; + +export default B; \ No newline at end of file diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx new file mode 100644 index 0000000..76c99fa --- /dev/null +++ b/src/pages/Home.tsx @@ -0,0 +1,9 @@ +const Home = () => { + return ( +
+ Hello Daybook! +
+ ); +}; + +export default Home; \ No newline at end of file