From e9fc775b3a8abe63002dc8f0e816ccd00cc1520e Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:28:16 -0500 Subject: [PATCH] [+] Router --- frontend/package.json | 1 + frontend/src/App.tsx | 23 ++++++----------------- frontend/yarn.lock | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index e70dba5..a6c5276 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ "@types/react-dom": "^18.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.20.0", "react-scripts": "5.0.1", "sass": "^1.69.5", "typescript": "^4.4.2", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5a7d0c8..056178d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,26 +1,15 @@ import React from 'react'; -import logo from './logo.svg'; import './App.sass'; +import {Route, BrowserRouter as Router} from "react-router-dom"; function App() { - return ( + return
-
- logo -

- Edit src/App.tsx and save to reload. -

- - Learn React - -
+ + +
- ); +
} export default App; diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 1fb0074..b2aba93 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1662,6 +1662,11 @@ schema-utils "^3.0.0" source-map "^0.7.3" +"@remix-run/router@1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.13.0.tgz#7e29c4ee85176d9c08cb0f4456bff74d092c5065" + integrity sha512-5dMOnVnefRsl4uRnAdoWjtVTdh8e6aZqgM4puy9nmEADH72ck+uXwzpJLEKE9Q6F8ZljNewLgmTfkxUrBdv4WA== + "@rollup/plugin-babel@^5.2.0": version "5.3.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283" @@ -7818,6 +7823,21 @@ react-refresh@^0.11.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== +react-router-dom@^6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.20.0.tgz#7b9527a1e29c7fb90736a5f89d54ca01f40e264b" + integrity sha512-CbcKjEyiSVpA6UtCHOIYLUYn/UJfwzp55va4yEfpk7JBN3GPqWfHrdLkAvNCcpXr8QoihcDMuk0dzWZxtlB/mQ== + dependencies: + "@remix-run/router" "1.13.0" + react-router "6.20.0" + +react-router@6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.20.0.tgz#4275a3567ecc55f7703073158048db10096bb539" + integrity sha512-pVvzsSsgUxxtuNfTHC4IxjATs10UaAtvLGVSA1tbUE4GDaOSU1Esu2xF5nWLz7KPiMuW8BJWuPFdlGYJ7/rW0w== + dependencies: + "@remix-run/router" "1.13.0" + react-scripts@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003"