From b4098280d0335bcf945c2b92563298949a7f80e2 Mon Sep 17 00:00:00 2001 From: Jaco Date: Tue, 28 Mar 2023 09:35:15 +0300 Subject: [PATCH] Upgrade to latest react-router (#9230) * Upgrade to latest react-router * Additional * Adjustment to tabs, dedupe routes * Adjust for Route element={...} usage * Align (soon-to-be-removed) gilt routing * Change path='' to index --- packages/apps/src/Content/NotFound.tsx | 4 +- packages/page-accounts/src/index.tsx | 24 ++- packages/page-addresses/src/index.tsx | 15 +- packages/page-alliance/src/index.tsx | 72 +++++---- packages/page-assets/src/index.tsx | 30 ++-- packages/page-council/src/index.tsx | 19 ++- packages/page-democracy/src/index.tsx | 15 +- packages/page-explorer/src/index.tsx | 60 ++++---- packages/page-extrinsics/src/index.tsx | 38 +++-- packages/page-gilt/src/index.tsx | 15 +- packages/page-nfts/src/index.tsx | 28 ++-- packages/page-parachains/src/index.tsx | 51 +++--- packages/page-ranked/src/App.tsx | 32 ++-- packages/page-rpc/src/index.tsx | 15 +- packages/page-runtime/src/index.tsx | 15 +- packages/page-settings/src/index.tsx | 42 +++-- packages/page-signing/src/index.tsx | 22 ++- packages/page-society/src/index.tsx | 53 ++++--- packages/page-staking/src/index.tsx | 109 ++++++------- packages/page-staking2/src/index.tsx | 45 +++--- packages/page-storage/src/Selection/index.tsx | 29 +++- packages/page-sudo/src/index.tsx | 36 +++-- packages/page-tech-comm/src/App.tsx | 44 +++--- packages/page-treasury/src/index.tsx | 36 +++-- packages/page-utilities/src/index.tsx | 24 ++- packages/react-components/package.json | 4 +- packages/react-components/src/Inset.tsx | 145 ------------------ packages/react-components/src/Tabs/Tab.tsx | 25 ++- .../react-components/src/TreasuryProposal.tsx | 16 +- packages/react-components/src/index.ts | 1 - packages/react-components/src/styles/index.ts | 4 +- yarn.lock | 112 ++++---------- 32 files changed, 572 insertions(+), 608 deletions(-) delete mode 100644 packages/react-components/src/Inset.tsx diff --git a/packages/apps/src/Content/NotFound.tsx b/packages/apps/src/Content/NotFound.tsx index 9f83252f3a..3946094e23 100644 --- a/packages/apps/src/Content/NotFound.tsx +++ b/packages/apps/src/Content/NotFound.tsx @@ -4,7 +4,7 @@ import type { RouteProps } from '@polkadot/apps-routing/types'; import React from 'react'; -import { Redirect } from 'react-router'; +import { Navigate } from 'react-router'; interface Props extends RouteProps { missingApis?: (string | string[])[]; @@ -14,7 +14,7 @@ function NotFound ({ basePath, missingApis = [] }: Props): React.ReactElement { console.log(`Redirecting from route "${basePath}" to "/explorer"${missingApis.length ? `, missing the following APIs: ${JSON.stringify(missingApis)}` : ''}`); return ( - + ); } diff --git a/packages/page-accounts/src/index.tsx b/packages/page-accounts/src/index.tsx index 4e7b71e706..58ad72c6dd 100644 --- a/packages/page-accounts/src/index.tsx +++ b/packages/page-accounts/src/index.tsx @@ -4,7 +4,7 @@ import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useAccounts, useIpfs } from '@polkadot/react-hooks'; @@ -42,14 +42,22 @@ function AccountsApp ({ basePath, onStatusChange }: Props): React.ReactElement
+ + } + path='api' + /> + } + path='forks' + /> + } + path='latency' + /> + } + path='node' + /> + } + path='query/:value?' + /> + + } + index /> - +
); } diff --git a/packages/page-extrinsics/src/index.tsx b/packages/page-extrinsics/src/index.tsx index f4f699309a..23b965ffb2 100644 --- a/packages/page-extrinsics/src/index.tsx +++ b/packages/page-extrinsics/src/index.tsx @@ -7,7 +7,7 @@ import type { AppProps as Props } from '@polkadot/react-components/types'; import type { DecodedExtrinsic } from './types.js'; import React, { useRef, useState } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; @@ -15,15 +15,6 @@ import Decoder from './Decoder.js'; import Submission from './Submission.js'; import { useTranslation } from './translate.js'; -function createPathRef (basePath: string): Record { - return { - decode: [ - `${basePath}/decode/:encoded`, - `${basePath}/decode` - ] - }; -} - function createItemsRef (t: TFunction): TabItem[] { return [ { @@ -43,7 +34,6 @@ function ExtrinsicsApp ({ basePath }: Props): React.ReactElement { const { t } = useTranslation(); const [decoded, setDecoded] = useState(null); const itemsRef = useRef(createItemsRef(t)); - const pathRef = useRef(createPathRef(basePath)); return (
@@ -51,17 +41,25 @@ function ExtrinsicsApp ({ basePath }: Props): React.ReactElement { basePath={basePath} items={itemsRef.current} /> - - - + + + } + path='decode/:encoded?' + /> + + } + index /> - - - - +
); } diff --git a/packages/page-gilt/src/index.tsx b/packages/page-gilt/src/index.tsx index 3b75b8ecea..cd72e41ec5 100644 --- a/packages/page-gilt/src/index.tsx +++ b/packages/page-gilt/src/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import React, { useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; @@ -31,11 +31,16 @@ function GiltApp ({ basePath, className }: Props): React.ReactElement { basePath={basePath} items={tabsRef.current} /> - - - + + + + } + index + /> - + ); } diff --git a/packages/page-nfts/src/index.tsx b/packages/page-nfts/src/index.tsx index 4124aedc52..ebd1c5e4c9 100644 --- a/packages/page-nfts/src/index.tsx +++ b/packages/page-nfts/src/index.tsx @@ -4,7 +4,7 @@ import '@polkadot/api-augment/substrate'; import React, { useMemo, useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useAccounts } from '@polkadot/react-hooks'; @@ -52,17 +52,25 @@ function NftApp ({ basePath, className }: Props): React.ReactElement { hidden={hidden} items={tabsRef.current} /> - - - - - - + + + } + path='my-nfts' + /> + + } + index /> - + ); } diff --git a/packages/page-parachains/src/index.tsx b/packages/page-parachains/src/index.tsx index 36dd992a70..aef7186219 100644 --- a/packages/page-parachains/src/index.tsx +++ b/packages/page-parachains/src/index.tsx @@ -6,7 +6,7 @@ import '@polkadot/api-augment/substrate'; import type { ParaId } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { useLocation } from 'react-router-dom'; import { Tabs } from '@polkadot/react-components'; @@ -76,27 +76,38 @@ function ParachainsApp ({ basePath, className }: Props): React.ReactElement - - - + + + } + path='auctions' + /> + + } + path='crowdloan' + /> + + } + path='proposals' /> - - - - - - - + - - - + + + } + path='referenda' + /> + + } + index /> - - - - + ); } diff --git a/packages/page-rpc/src/index.tsx b/packages/page-rpc/src/index.tsx index a715c23dba..dd2d9e4cc6 100644 --- a/packages/page-rpc/src/index.tsx +++ b/packages/page-rpc/src/index.tsx @@ -4,7 +4,7 @@ import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; @@ -28,9 +28,16 @@ function RpcApp ({ basePath }: Props): React.ReactElement { basePath={basePath} items={itemsRef.current} /> - - - + + + + } + index + /> + + ); } diff --git a/packages/page-runtime/src/index.tsx b/packages/page-runtime/src/index.tsx index d7a9d1fbc5..5a9886f132 100644 --- a/packages/page-runtime/src/index.tsx +++ b/packages/page-runtime/src/index.tsx @@ -4,7 +4,7 @@ import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; @@ -28,9 +28,16 @@ function RuntimeApp ({ basePath }: Props): React.ReactElement { basePath={basePath} items={itemsRef.current} /> - - - + + + + } + index + /> + + ); } diff --git a/packages/page-settings/src/index.tsx b/packages/page-settings/src/index.tsx index 9576df997d..b10cce4504 100644 --- a/packages/page-settings/src/index.tsx +++ b/packages/page-settings/src/index.tsx @@ -4,7 +4,7 @@ import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useMemo } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; @@ -60,20 +60,34 @@ function SettingsApp ({ basePath, onStatusChange }: Props): React.ReactElement
diff --git a/packages/page-tech-comm/src/App.tsx b/packages/page-tech-comm/src/App.tsx index f96a1d29d5..d28054ec9e 100644 --- a/packages/page-tech-comm/src/App.tsx +++ b/packages/page-tech-comm/src/App.tsx @@ -5,7 +5,7 @@ import type { CollectiveType } from '@polkadot/react-hooks/types'; import type { Hash } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall, useCollectiveMembers } from '@polkadot/react-hooks'; @@ -53,26 +53,34 @@ function TechCommApp ({ basePath, className, type }: Props): React.ReactElement< } items={items} /> - - - - + - + } + path='proposals' + /> + + } + index /> - + ); } diff --git a/packages/page-treasury/src/index.tsx b/packages/page-treasury/src/index.tsx index 8513a26586..b8e06a861a 100644 --- a/packages/page-treasury/src/index.tsx +++ b/packages/page-treasury/src/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import React, { useMemo } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCollectiveMembers } from '@polkadot/react-hooks'; @@ -51,21 +51,29 @@ function TreasuryApp ({ basePath }: Props): React.ReactElement { basePath={basePath} items={items} /> - - - + + + } + path='tips' + /> + + } + index /> - - - - + ); } diff --git a/packages/page-utilities/src/index.tsx b/packages/page-utilities/src/index.tsx index 1c50ed88bd..7eedb8b495 100644 --- a/packages/page-utilities/src/index.tsx +++ b/packages/page-utilities/src/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import React, { useRef } from 'react'; -import { Route, Switch } from 'react-router'; +import { Route, Routes } from 'react-router'; import { Tabs } from '@polkadot/react-components'; @@ -36,14 +36,22 @@ function UtilitiesApp ({ basePath, className }: Props): React.ReactElement - - - + + + + } + path='hash' + /> + + } + index + /> - - - - + ); } diff --git a/packages/react-components/package.json b/packages/react-components/package.json index c90ab3c6be..f09a0bc25d 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -45,8 +45,8 @@ "react-i18next": "^12.2.0", "react-is": "^18.2.0", "react-markdown": "^8.0.6", - "react-router": "^5.3.4", - "react-router-dom": "^5.3.4", + "react-router": "^6.9.0", + "react-router-dom": "^6.9.0", "react-tooltip": "^4.5.1", "rehype-raw": "^6.1.1", "semantic-ui-css": "^2.5.0", diff --git a/packages/react-components/src/Inset.tsx b/packages/react-components/src/Inset.tsx deleted file mode 100644 index a62ce010b8..0000000000 --- a/packages/react-components/src/Inset.tsx +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2017-2023 @polkadot/app-democracy authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import React, { useCallback } from 'react'; -import { useHistory } from 'react-router-dom'; - -import { useToggle } from '@polkadot/react-hooks'; - -import Icon from './Icon.js'; -import { styled } from './styled.js'; - -export interface InsetProps { - className?: string; - children?: React.ReactNode; - isCollapsible?: boolean; - isError?: boolean; - isSuccess?: boolean; - header?: React.ReactNode; - href?: string | null; - withTopMargin?: boolean; - withBottomMargin?: boolean; -} - -function Inset ({ children, className = '', header, href, isCollapsible, isError, isSuccess, withBottomMargin, withTopMargin }: InsetProps): React.ReactElement | null { - const history = useHistory(); - const [isCollapsed, toggleCollapsed] = useToggle(); - - const _onClick = useCallback( - (): void => { - href && history.push(href); - }, - [history, href] - ); - - if (!children) { - return null; - } - - return ( - - {isCollapsible && ( -
-

{header}

- -
- )} -
- {children} -
-
- ); -} - -const StyledDiv = styled.div` - & { - box-shadow: 0 3px 3px rgba(0,0,0,.2); - position: relative; - background: #fefefe; - padding: 1rem; - transition: all 0.2s; - display: flex; - flex-direction: column; - - &.bottom-margin { - margin-bottom: 2rem; - } - - &.top-margin { - margin-top: 2rem; - } - - &.error { - background: rgba(255, 0, 0, 0.05); - - &, h1, h2, h3, h4, h5, h6, p { - color: rgba(156, 0, 0) !important; - } - } - - &.success { - border: 1px solid rgb(168, 255, 136); - background: rgba(0, 255, 0, 0.05); - - &, h1, h2, h3, h4, h5, h6, p { - color: rgba(34, 125, 0) !important; - } - } - - .header { - cursor: pointer; - height: 2rem; - width: 100%; - - h3 { - line-height: 2rem; - margin-bottom: 0; - } - - .icon { - height: 4rem; - width: 4rem; - font-size: 2rem; - color: rgba(0,0,0,0.35); - position: absolute; - right: 0; - top: 0; - line-height: 4rem; - transition: all 0.2s; - transform-origin: center center; - - &.collapsed { - transform: rotate(180deg); - } - } - } - - .children { - &.collapsed { - display: none; - } - } - - &.as-link { - cursor: pointer; - - &:hover { - box-shadow: 0 5px 5px rgba(0,0,0,.2); - transform: translateY(-2px); - } - } - } -`; - -export default React.memo(Inset); diff --git a/packages/react-components/src/Tabs/Tab.tsx b/packages/react-components/src/Tabs/Tab.tsx index 2e7d834efc..21c494063c 100644 --- a/packages/react-components/src/Tabs/Tab.tsx +++ b/packages/react-components/src/Tabs/Tab.tsx @@ -27,10 +27,8 @@ function Tab ({ basePath, className = '', count, hasParams, index, isExact, isRo return (
@@ -63,18 +61,19 @@ const StyledNavLink = styled(NavLink)` } } - &:hover .tabLinkText::after, - &.tabLinkActive .tabLinkText::after { - content: ''; - position: absolute; - width: 3.14rem; - height: 2px; - bottom: -2px; - left: 50%; - transform: translateX(-50%); + &.active, &:hover { + .tabLinkText::after { + content: ''; + position: absolute; + width: 3.14rem; + height: 2px; + bottom: -2px; + left: 50%; + transform: translateX(-50%); + } } - &.tabLinkActive { + &.active { color: var(--color-text) !important; font-weight: var(--font-weight-normal); diff --git a/packages/react-components/src/TreasuryProposal.tsx b/packages/react-components/src/TreasuryProposal.tsx index e09e81e0ff..4d4feb6c25 100644 --- a/packages/react-components/src/TreasuryProposal.tsx +++ b/packages/react-components/src/TreasuryProposal.tsx @@ -10,22 +10,19 @@ import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import InputAddress from './InputAddress/index.js'; -import Inset, { InsetProps } from './Inset.js'; import Labelled from './Labelled.js'; import Static from './Static.js'; import { useTranslation } from './translate.js'; interface Props { className?: string; - asInset?: boolean; - insetProps?: Partial; onClick?: () => void; proposalId?: string; proposal?: TreasuryProposalType | null; withLink?: boolean; } -function TreasuryProposal ({ asInset, className = '', insetProps, onClick, proposal, proposalId }: Props): React.ReactElement | null { +function TreasuryProposal ({ className = '', onClick, proposal, proposalId }: Props): React.ReactElement | null { const { t } = useTranslation(); const [stateProposal, setProposal] = useState(null); const { api } = useApi(); @@ -76,17 +73,6 @@ function TreasuryProposal ({ asInset, className = '', insetProps, onClick, propo ); - if (asInset) { - return ( - - {inner} - - ); - } - return (
(({ theme, uiHighlight }: Pr .theme--dark, .theme--light { - .ui--Tabs .tabLinkActive .tabLinkText::after{ - background: ${getHighlight(uiHighlight)}; + .ui--Tabs .active .tabLinkText::after { + background: ${getHighlight(uiHighlight)}; } .ui.primary.button, diff --git a/yarn.lock b/yarn.lock index 7adf1290c1..2ac4de076e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -136,7 +136,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.9.2": version: 7.21.0 resolution: "@babel/runtime@npm:7.21.0" dependencies: @@ -2043,8 +2043,8 @@ __metadata: react-i18next: ^12.2.0 react-is: ^18.2.0 react-markdown: ^8.0.6 - react-router: ^5.3.4 - react-router-dom: ^5.3.4 + react-router: ^6.9.0 + react-router-dom: ^6.9.0 react-tooltip: ^4.5.1 rehype-raw: ^6.1.1 semantic-ui-css: ^2.5.0 @@ -2526,6 +2526,13 @@ __metadata: languageName: node linkType: hard +"@remix-run/router@npm:1.4.0": + version: 1.4.0 + resolution: "@remix-run/router@npm:1.4.0" + checksum: 707dce35a2b8138005cf19e63f6fd3c4da05b4b892e9e9118e8b727c3b95953efe27307ca2df35084044df30fa1fc367cf0bbc98d1ded9020c82e61e6242caaf + languageName: node + linkType: hard + "@rollup/plugin-alias@npm:^4.0.3": version: 4.0.3 resolution: "@rollup/plugin-alias@npm:4.0.3" @@ -9854,20 +9861,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"history@npm:^4.9.0": - version: 4.10.1 - resolution: "history@npm:4.10.1" - dependencies: - "@babel/runtime": ^7.1.2 - loose-envify: ^1.2.0 - resolve-pathname: ^3.0.0 - tiny-invariant: ^1.0.2 - tiny-warning: ^1.0.0 - value-equal: ^1.0.1 - checksum: addd84bc4683929bae4400419b5af132ff4e4e9b311a0d4e224579ea8e184a6b80d7f72c55927e4fa117f69076a9e47ce082d8d0b422f1a9ddac7991490ca1d0 - languageName: node - linkType: hard - "hmac-drbg@npm:^1.0.1": version: 1.0.1 resolution: "hmac-drbg@npm:1.0.1" @@ -9879,7 +9872,7 @@ fsevents@~2.3.2: languageName: node linkType: hard -"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.1.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.2": +"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" dependencies: @@ -10986,13 +10979,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"isarray@npm:0.0.1": - version: 0.0.1 - resolution: "isarray@npm:0.0.1" - checksum: 49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 - languageName: node - linkType: hard - "isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" @@ -11675,7 +11661,7 @@ fsevents@~2.3.2: languageName: node linkType: hard -"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.2.0, loose-envify@npm:^1.3.1, loose-envify@npm:^1.4.0": +"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": version: 1.4.0 resolution: "loose-envify@npm:1.4.0" dependencies: @@ -13562,15 +13548,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"path-to-regexp@npm:^1.7.0": - version: 1.8.0 - resolution: "path-to-regexp@npm:1.8.0" - dependencies: - isarray: 0.0.1 - checksum: 709f6f083c0552514ef4780cb2e7e4cf49b0cc89a97439f2b7cc69a608982b7690fb5d1720a7473a59806508fc2dae0be751ba49f495ecf89fd8fbc62abccbcd - languageName: node - linkType: hard - "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -14389,7 +14366,7 @@ fsevents@~2.3.2: languageName: node linkType: hard -"react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.6.3, react-is@npm:^16.7.0, react-is@npm:^16.8.6": +"react-is@npm:^16.13.1, react-is@npm:^16.6.3, react-is@npm:^16.7.0, react-is@npm:^16.8.6": version: 16.13.1 resolution: "react-is@npm:16.13.1" checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f @@ -14489,39 +14466,27 @@ fsevents@~2.3.2: languageName: node linkType: hard -"react-router-dom@npm:^5.3.4": - version: 5.3.4 - resolution: "react-router-dom@npm:5.3.4" +"react-router-dom@npm:^6.9.0": + version: 6.9.0 + resolution: "react-router-dom@npm:6.9.0" dependencies: - "@babel/runtime": ^7.12.13 - history: ^4.9.0 - loose-envify: ^1.3.1 - prop-types: ^15.6.2 - react-router: 5.3.4 - tiny-invariant: ^1.0.2 - tiny-warning: ^1.0.0 + "@remix-run/router": 1.4.0 + react-router: 6.9.0 peerDependencies: - react: ">=15" - checksum: b86a6f2f5222f041e38adf4e4b32c7643d6735a1a915ef25855b2db285fd059d72ba8d62e5bcd5d822b8ef9520a80453209e55077f5a90d0f72e908979b8f535 + react: ">=16.8" + react-dom: ">=16.8" + checksum: 4d593491ab8db5611feda70002c62902baebb84d5c1c5e5b6172496f31f91130deee132bf4240dea634a88cb86c76d6da348f15b9cd5e5197be455efd88edf72 languageName: node linkType: hard -"react-router@npm:5.3.4, react-router@npm:^5.3.4": - version: 5.3.4 - resolution: "react-router@npm:5.3.4" +"react-router@npm:6.9.0, react-router@npm:^6.9.0": + version: 6.9.0 + resolution: "react-router@npm:6.9.0" dependencies: - "@babel/runtime": ^7.12.13 - history: ^4.9.0 - hoist-non-react-statics: ^3.1.0 - loose-envify: ^1.3.1 - path-to-regexp: ^1.7.0 - prop-types: ^15.6.2 - react-is: ^16.6.0 - tiny-invariant: ^1.0.2 - tiny-warning: ^1.0.0 + "@remix-run/router": 1.4.0 peerDependencies: - react: ">=15" - checksum: 892d4e274a23bf4f39abc2efca54472fb646d3aed4b584020cf49654d2f50d09a2bacebe7c92b4ec7cb8925077376dfcd0664bad6442a73604397cefec9f01f9 + react: ">=16.8" + checksum: b2a5f42e042bee7a7f116ca7817b0e58359e5353d84887c9fe7a633d7490c03b1e0ae37cd01830c2a381e3d1e7d501bb4751e53cc3d491e25f36582d3f6e0546 languageName: node linkType: hard @@ -14949,13 +14914,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"resolve-pathname@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-pathname@npm:3.0.0" - checksum: 6147241ba42c423dbe83cb067a2b4af4f60908c3af57e1ea567729cc71416c089737fe2a73e9e79e7a60f00f66c91e4b45ad0d37cd4be2d43fec44963ef14368 - languageName: node - linkType: hard - "resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.1": version: 1.22.1 resolution: "resolve@npm:1.22.1" @@ -16639,20 +16597,13 @@ fsevents@~2.3.2: languageName: node linkType: hard -"tiny-invariant@npm:^1.0.2, tiny-invariant@npm:^1.0.6": +"tiny-invariant@npm:^1.0.6": version: 1.1.0 resolution: "tiny-invariant@npm:1.1.0" checksum: 27d29bbb9e1d1d86e25766711c28ad91af6d67c87d561167077ac7fbce5212b97bbfe875e70bc369808e075748c825864c9b61f0e9f8652275ec86bcf4dcc924 languageName: node linkType: hard -"tiny-warning@npm:^1.0.0": - version: 1.0.3 - resolution: "tiny-warning@npm:1.0.3" - checksum: da62c4acac565902f0624b123eed6dd3509bc9a8d30c06e017104bedcf5d35810da8ff72864400ad19c5c7806fc0a8323c68baf3e326af7cb7d969f846100d71 - languageName: node - linkType: hard - "tmp-promise@npm:^3.0.2": version: 3.0.2 resolution: "tmp-promise@npm:3.0.2" @@ -17485,13 +17436,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"value-equal@npm:^1.0.1": - version: 1.0.1 - resolution: "value-equal@npm:1.0.1" - checksum: bb7ae1facc76b5cf8071aeb6c13d284d023fdb370478d10a5d64508e0e6e53bb459c4bbe34258df29d82e6f561f874f0105eba38de0e61fe9edd0bdce07a77a2 - languageName: node - linkType: hard - "value-or-function@npm:^3.0.0": version: 3.0.0 resolution: "value-or-function@npm:3.0.0"