diff --git a/package.json b/package.json index 3fe87ebc..bd94c06e 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "react-leaflet-draw": "^0.20.1", "react-markdown": "^8.0.3", "react-moment": "^1.1.2", - "react-router": "^6.4.1", - "react-router-dom": "^6.4.1", + "react-router": "^6.8.2", + "react-router-dom": "^6.8.2", "react-twitter-auth": "0.0.13" }, "devDependencies": { diff --git a/src/components/ProtectedRoute.tsx b/src/components/ProtectedRoute.tsx index e375a871..6b1ca21c 100644 --- a/src/components/ProtectedRoute.tsx +++ b/src/components/ProtectedRoute.tsx @@ -2,7 +2,7 @@ import React, { FC } from 'react' import { Navigate, RouteProps } from 'react-router' import useAuth, { Roles } from './useAuth' -interface Props extends RouteProps { +type Props = RouteProps & { role: Roles outlet: JSX.Element } diff --git a/yarn.lock b/yarn.lock index e59b630d..3affe7d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1785,10 +1785,10 @@ resolved "https://registry.yarnpkg.com/@react-leaflet/core/-/core-2.1.0.tgz#383acd31259d7c9ae8fb1b02d5e18fe613c2a13d" integrity sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg== -"@remix-run/router@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.0.1.tgz#88d7ac31811ab0cef14aaaeae2a0474923b278bc" - integrity sha512-eBV5rvW4dRFOU1eajN7FmYxjAIVz/mRHgUE9En9mBn6m3mulK3WTR5C3iQhL9MZ14rWAq+xOlEaCkDiW0/heOg== +"@remix-run/router@1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.3.3.tgz#d6d531d69c0fa3a44fda7dc00b20d49b44549164" + integrity sha512-YRHie1yQEj0kqqCTCJEfHqYSSNlZQ696QJG+MMiW4mxSl9I0ojz/eRhJS4fs88Z5i6D1SmoF9d3K99/QOhI8/w== "@rushstack/eslint-patch@^1.1.0": version "1.1.4" @@ -7583,20 +7583,20 @@ react-moment@^1.1.2: resolved "https://registry.yarnpkg.com/react-moment/-/react-moment-1.1.2.tgz#a9b157c58ddd226a2f746e5ca43415b24a17b6af" integrity sha512-lfb+shYXI2tXlQrNUpNr05/1D/kzFj8Isbfp89DQrpZk0fs2JIAnLHWETR0hQS9zvtzwLWlVv0wKLffbue5HoA== -react-router-dom@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.4.1.tgz#99c9b7c4967890701c888517475aa5d54d25760e" - integrity sha512-MY7NJCrGNVJtGp8ODMOBHu20UaIkmwD2V3YsAOUQoCXFk7Ppdwf55RdcGyrSj+ycSL9Uiwrb3gTLYSnzcRoXww== +react-router-dom@^6.8.2: + version "6.8.2" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.8.2.tgz#a6654a3400be9aafd504d7125573568921b78b57" + integrity sha512-N/oAF1Shd7g4tWy+75IIufCGsHBqT74tnzHQhbiUTYILYF0Blk65cg+HPZqwC+6SqEyx033nKqU7by38v3lBZg== dependencies: - "@remix-run/router" "1.0.1" - react-router "6.4.1" + "@remix-run/router" "1.3.3" + react-router "6.8.2" -react-router@6.4.1, react-router@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.4.1.tgz#dd9cc4dfa264751d143a4b6c9d4faa60ab3ce26c" - integrity sha512-OJASKp5AykDWFewgWUim1vlLr7yfD4vO/h+bSgcP/ix8Md+LMHuAjovA74MQfsfhQJGGN1nHRhwS5qQQbbBt3A== +react-router@6.8.2, react-router@^6.8.2: + version "6.8.2" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.8.2.tgz#98f83582a73f316a3287118b440f0cee30ed6f33" + integrity sha512-lF7S0UmXI5Pd8bmHvMdPKI4u4S5McxmHnzJhrYi9ZQ6wE+DA8JN5BzVC5EEBuduWWDaiJ8u6YhVOCmThBli+rw== dependencies: - "@remix-run/router" "1.0.1" + "@remix-run/router" "1.3.3" react-transition-group@^4.4.5: version "4.4.5"