From dcf265b5ee97b0d99bd634ae662d668987003384 Mon Sep 17 00:00:00 2001
From: Ana Maksimovskikh <ana.maksimovskikh@trili.tech>
Date: Tue, 7 Jan 2025 22:23:41 +0000
Subject: [PATCH] Migrate react-router to v7.0.0

---
 apps/desktop/package.json                     |  2 +-
 .../src/components/SendFlow/SuccessStep.tsx   |  2 +-
 apps/embed-iframe-mainnet/package.json        |  2 +-
 apps/embed-iframe/package.json                |  2 +-
 apps/web/package.json                         |  4 +-
 .../src/components/SendFlow/SuccessStep.tsx   |  2 +-
 pnpm-lock.yaml                                | 83 ++++++++++++-------
 7 files changed, 60 insertions(+), 37 deletions(-)

diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index 459542ded5..7fb482deba 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -138,7 +138,7 @@
     "react-refresh": "^0.16.0",
     "react-remove-scroll": "^2.6.2",
     "react-responsive-carousel": "^3.2.23",
-    "react-router-dom": "^6.28.1",
+    "react-router-dom": "^7.0.0",
     "react-test-renderer": "^18.3.1",
     "redux": "^5.0.1",
     "redux-persist": "^6.0.0",
diff --git a/apps/desktop/src/components/SendFlow/SuccessStep.tsx b/apps/desktop/src/components/SendFlow/SuccessStep.tsx
index 4e7179f7e6..c86a839a63 100644
--- a/apps/desktop/src/components/SendFlow/SuccessStep.tsx
+++ b/apps/desktop/src/components/SendFlow/SuccessStep.tsx
@@ -40,7 +40,7 @@ export const SuccessStep = ({ hash }: { hash: string }) => {
           width="100%"
           onClick={() => {
             onClose();
-            navigate("/operations");
+            return navigate("/operations");
           }}
           size="lg"
         >
diff --git a/apps/embed-iframe-mainnet/package.json b/apps/embed-iframe-mainnet/package.json
index ebe45d8126..30a409c8e6 100644
--- a/apps/embed-iframe-mainnet/package.json
+++ b/apps/embed-iframe-mainnet/package.json
@@ -13,7 +13,7 @@
     "@umami/embed-iframe": "workspace:^",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
-    "react-router-dom": "^6.28.1"
+    "react-router-dom": "^7.0.0"
   },
   "devDependencies": {
     "@umami/eslint-config": "workspace:^",
diff --git a/apps/embed-iframe/package.json b/apps/embed-iframe/package.json
index 61fc2e5e9d..f0bf0cf8a9 100644
--- a/apps/embed-iframe/package.json
+++ b/apps/embed-iframe/package.json
@@ -42,7 +42,7 @@
     "framer-motion": "^11.15.0",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
-    "react-router-dom": "^6.28.1"
+    "react-router-dom": "^7.0.0"
   },
   "devDependencies": {
     "@umami/eslint-config": "workspace:^",
diff --git a/apps/web/package.json b/apps/web/package.json
index e2a82f397d..4beeb3c2f7 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -77,8 +77,8 @@
     "react-redux": "^9.2.0",
     "react-remove-scroll": "^2.6.2",
     "react-responsive-carousel": "^3.2.23",
-    "react-router": "^6.28.1",
-    "react-router-dom": "^6.28.1",
+    "react-router": "^7.0.0",
+    "react-router-dom": "^7.0.0",
     "react-test-renderer": "^18.3.1",
     "redux": "^5.0.1",
     "redux-persist": "^6.0.0",
diff --git a/apps/web/src/components/SendFlow/SuccessStep.tsx b/apps/web/src/components/SendFlow/SuccessStep.tsx
index 6c24faec62..680efb2fb8 100644
--- a/apps/web/src/components/SendFlow/SuccessStep.tsx
+++ b/apps/web/src/components/SendFlow/SuccessStep.tsx
@@ -51,7 +51,7 @@ export const SuccessStep = ({ hash }: { hash: string }) => {
           width="100%"
           onClick={() => {
             onClose();
-            navigate("/activity");
+            return navigate("/activity");
           }}
           size="lg"
           variant="primary"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4357c41873..4767f7ec81 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -344,8 +344,8 @@ importers:
         specifier: ^3.2.23
         version: 3.2.23
       react-router-dom:
-        specifier: ^6.28.1
-        version: 6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+        specifier: ^7.0.0
+        version: 7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
       react-test-renderer:
         specifier: ^18.3.1
         version: 18.3.1(react@18.3.1)
@@ -555,8 +555,8 @@ importers:
         specifier: ^18.3.1
         version: 18.3.1(react@18.3.1)
       react-router-dom:
-        specifier: ^6.28.1
-        version: 6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+        specifier: ^7.0.0
+        version: 7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
     devDependencies:
       '@umami/eslint-config':
         specifier: workspace:^
@@ -616,8 +616,8 @@ importers:
         specifier: ^18.3.1
         version: 18.3.1(react@18.3.1)
       react-router-dom:
-        specifier: ^6.28.1
-        version: 6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+        specifier: ^7.0.0
+        version: 7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
     devDependencies:
       '@umami/eslint-config':
         specifier: workspace:^
@@ -966,11 +966,11 @@ importers:
         specifier: ^3.2.23
         version: 3.2.23
       react-router:
-        specifier: ^6.28.1
-        version: 6.28.1(react@18.3.1)
+        specifier: ^7.0.0
+        version: 7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
       react-router-dom:
-        specifier: ^6.28.1
-        version: 6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+        specifier: ^7.0.0
+        version: 7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
       react-test-renderer:
         specifier: ^18.3.1
         version: 18.3.1(react@18.3.1)
@@ -4752,10 +4752,6 @@ packages:
       react-redux:
         optional: true
 
-  '@remix-run/router@1.21.0':
-    resolution: {integrity: sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA==}
-    engines: {node: '>=14.0.0'}
-
   '@reown/walletkit@1.0.1':
     resolution: {integrity: sha512-h/KP22V05V5tlFPiP++krxROfz0eGYbr925eN9cnmcw4FZmy3uCLOecDQcJiPPvPZLw7rqMPMOzx1PGUK5uJNQ==}
 
@@ -6025,6 +6021,9 @@ packages:
   '@types/cli-table@0.3.4':
     resolution: {integrity: sha512-GsALrTL69mlwbAw/MHF1IPTadSLZQnsxe7a80G8l4inN/iEXCOcVeT/S7aRc6hbhqzL9qZ314kHPDQnQ3ev+HA==}
 
+  '@types/cookie@0.6.0':
+    resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
+
   '@types/debug@4.1.12':
     resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
 
@@ -7390,6 +7389,10 @@ packages:
   cookie-es@1.2.2:
     resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==}
 
+  cookie@0.7.2:
+    resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}
+    engines: {node: '>= 0.6'}
+
   copy-to-clipboard@3.3.3:
     resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==}
 
@@ -11068,18 +11071,22 @@ packages:
   react-responsive-carousel@3.2.23:
     resolution: {integrity: sha512-pqJLsBaKHWJhw/ItODgbVoziR2z4lpcJg+YwmRlSk4rKH32VE633mAtZZ9kDXjy4wFO+pgUZmDKPsPe1fPmHCg==}
 
-  react-router-dom@6.28.1:
-    resolution: {integrity: sha512-YraE27C/RdjcZwl5UCqF/ffXnZDxpJdk9Q6jw38SZHjXs7NNdpViq2l2c7fO7+4uWaEfcwfGCv3RSg4e1By/fQ==}
-    engines: {node: '>=14.0.0'}
+  react-router-dom@7.1.1:
+    resolution: {integrity: sha512-vSrQHWlJ5DCfyrhgo0k6zViOe9ToK8uT5XGSmnuC2R3/g261IdIMpZVqfjD6vWSXdnf5Czs4VA/V60oVR6/jnA==}
+    engines: {node: '>=20.0.0'}
     peerDependencies:
-      react: '>=16.8'
-      react-dom: '>=16.8'
+      react: '>=18'
+      react-dom: '>=18'
 
-  react-router@6.28.1:
-    resolution: {integrity: sha512-2omQTA3rkMljmrvvo6WtewGdVh45SpL9hGiCI9uUrwGGfNFDIvGK4gYJsKlJoNVi6AQZcopSCballL+QGOm7fA==}
-    engines: {node: '>=14.0.0'}
+  react-router@7.1.1:
+    resolution: {integrity: sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==}
+    engines: {node: '>=20.0.0'}
     peerDependencies:
-      react: '>=16.8'
+      react: '>=18'
+      react-dom: '>=18'
+    peerDependenciesMeta:
+      react-dom:
+        optional: true
 
   react-shallow-renderer@16.15.0:
     resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==}
@@ -11496,6 +11503,9 @@ packages:
   set-blocking@2.0.0:
     resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
 
+  set-cookie-parser@2.7.1:
+    resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==}
+
   set-function-length@1.2.2:
     resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
     engines: {node: '>= 0.4'}
@@ -12155,6 +12165,9 @@ packages:
     cpu: [arm64]
     os: [linux]
 
+  turbo-stream@2.4.0:
+    resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==}
+
   turbo-windows-64@2.3.3:
     resolution: {integrity: sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==}
     cpu: [x64]
@@ -16588,8 +16601,6 @@ snapshots:
       react: 18.3.1
       react-redux: 9.2.0(@types/react@18.3.12)(react@18.3.1)(redux@5.0.1)
 
-  '@remix-run/router@1.21.0': {}
-
   '@reown/walletkit@1.0.1':
     dependencies:
       '@walletconnect/core': 2.16.2
@@ -18561,6 +18572,8 @@ snapshots:
 
   '@types/cli-table@0.3.4': {}
 
+  '@types/cookie@0.6.0': {}
+
   '@types/debug@4.1.12':
     dependencies:
       '@types/ms': 0.7.34
@@ -20575,6 +20588,8 @@ snapshots:
 
   cookie-es@1.2.2: {}
 
+  cookie@0.7.2: {}
+
   copy-to-clipboard@3.3.3:
     dependencies:
       toggle-selection: 1.0.6
@@ -25170,17 +25185,21 @@ snapshots:
       prop-types: 15.8.1
       react-easy-swipe: 0.0.21
 
-  react-router-dom@6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+  react-router-dom@7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
     dependencies:
-      '@remix-run/router': 1.21.0
       react: 18.3.1
       react-dom: 18.3.1(react@18.3.1)
-      react-router: 6.28.1(react@18.3.1)
+      react-router: 7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
 
-  react-router@6.28.1(react@18.3.1):
+  react-router@7.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
     dependencies:
-      '@remix-run/router': 1.21.0
+      '@types/cookie': 0.6.0
+      cookie: 0.7.2
       react: 18.3.1
+      set-cookie-parser: 2.7.1
+      turbo-stream: 2.4.0
+    optionalDependencies:
+      react-dom: 18.3.1(react@18.3.1)
 
   react-shallow-renderer@16.15.0(react@18.3.1):
     dependencies:
@@ -25649,6 +25668,8 @@ snapshots:
 
   set-blocking@2.0.0: {}
 
+  set-cookie-parser@2.7.1: {}
+
   set-function-length@1.2.2:
     dependencies:
       define-data-property: 1.1.4
@@ -26464,6 +26485,8 @@ snapshots:
   turbo-linux-arm64@2.3.3:
     optional: true
 
+  turbo-stream@2.4.0: {}
+
   turbo-windows-64@2.3.3:
     optional: true