From 74277225eb4f28ce09bb1f5d4d3a334d6ab8f552 Mon Sep 17 00:00:00 2001 From: charliemidtlyng Date: Mon, 25 Nov 2024 15:10:42 +0100 Subject: [PATCH] =?UTF-8?q?Skal=20ha=20fullstendige=20url-er=20n=C3=A5r=20?= =?UTF-8?q?vi=20bruker=20navigate-funksjonen=20til=20react-router-dom,=20h?= =?UTF-8?q?vis=20ikke=20appender=20den=20bare=20p=C3=A5=20eksisterende=20u?= =?UTF-8?q?rl=20og=20vi=20risikerer=20uendelig=20l=C3=B8kke=20med=20redire?= =?UTF-8?q?cts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../Behandling/BehandlingRoutes.tsx | 10 +++- .../Personoversikt/PersonOversiktSide.tsx | 12 ++++- yarn.lock | 49 +++++++++++++------ 4 files changed, 53 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index dbd2c7647..ff547ced7 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-pdf": "9.1.1", - "react-router-dom": "6.28.0", + "react-router-dom": "7.0.1", "react-router-prompt": "^0.7.1", "react-select": "^5.8.3", "styled-components": "^6.1.13", diff --git a/src/frontend/Komponenter/Behandling/BehandlingRoutes.tsx b/src/frontend/Komponenter/Behandling/BehandlingRoutes.tsx index 0ac367834..a2f47e5e6 100644 --- a/src/frontend/Komponenter/Behandling/BehandlingRoutes.tsx +++ b/src/frontend/Komponenter/Behandling/BehandlingRoutes.tsx @@ -18,7 +18,15 @@ const BehandlingRoutes: React.FC = ({ behandling }) => { element={React.createElement(fane.komponent, { behandling: behandling }, null)} /> ))} - } /> + + } + /> ); }; diff --git a/src/frontend/Komponenter/Personoversikt/PersonOversiktSide.tsx b/src/frontend/Komponenter/Personoversikt/PersonOversiktSide.tsx index e01a31021..03ce4f167 100644 --- a/src/frontend/Komponenter/Personoversikt/PersonOversiktSide.tsx +++ b/src/frontend/Komponenter/Personoversikt/PersonOversiktSide.tsx @@ -172,7 +172,7 @@ const PersonOversikt: React.FC = ({ { - navigate(fane); + navigate(`/person/${fagsakPerson.id}/${fane}`); loggNavigereTabEvent({ side: 'person', forrigeFane: path, @@ -199,7 +199,15 @@ const PersonOversikt: React.FC = ({ )} /> ))} - } /> + + } + /> diff --git a/yarn.lock b/yarn.lock index 819399b90..df0f2e994 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1747,11 +1747,6 @@ resolved "https://registry.yarnpkg.com/@redis/time-series/-/time-series-1.1.0.tgz#cba454c05ec201bd5547aaf55286d44682ac8eb5" integrity sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g== -"@remix-run/router@1.21.0": - version "1.21.0" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.21.0.tgz#c65ae4262bdcfe415dbd4f64ec87676e4a56e2b5" - integrity sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA== - "@rollup/rollup-android-arm-eabi@4.18.1": version "4.18.1" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz#f0da481244b7d9ea15296b35f7fe39cd81157396" @@ -1942,6 +1937,11 @@ dependencies: "@types/express" "*" +"@types/cookie@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" + integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA== + "@types/eslint-scope@^3.7.7": version "3.7.7" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" @@ -3312,6 +3312,11 @@ cookie@0.7.2: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== +cookie@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610" + integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA== + copy-anything@^2.0.1: version "2.0.6" resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480" @@ -6512,25 +6517,27 @@ react-refresh@^0.14.2: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== -react-router-dom@6.28.0: - version "6.28.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.28.0.tgz#f73ebb3490e59ac9f299377062ad1d10a9f579e6" - integrity sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg== +react-router-dom@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.0.1.tgz#b1438100800313e1b4c48da0c5fdb498f81c7f96" + integrity sha512-duBzwAAiIabhFPZfDjcYpJ+f08TMbPMETgq254GWne2NW1ZwRHhZLj7tpSp8KGb7JvZzlLcjGUnqLxpZQVEPng== dependencies: - "@remix-run/router" "1.21.0" - react-router "6.28.0" + react-router "7.0.1" react-router-prompt@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/react-router-prompt/-/react-router-prompt-0.7.1.tgz#1e5326d221824d092f47876147704de2447d5001" integrity sha512-U8G2gPMDkS6fdmcHebhkgKv9v/oxsErQFVQYuQ/DXKD/CUSxvXPQpikE//Ij+vZdXleOJwW3RJIkoa2ctVqnuw== -react-router@6.28.0: - version "6.28.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.28.0.tgz#29247c86d7ba901d7e5a13aa79a96723c3e59d0d" - integrity sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg== +react-router@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.0.1.tgz#a171e35a5c6463f76b23353c4ce57b53c8b7b1b9" + integrity sha512-WVAhv9oWCNsja5AkK6KLpXJDSJCQizOIyOd4vvB/+eHGbYx5vkhcmcmwWjQ9yqkRClogi+xjEg9fNEOd5EX/tw== dependencies: - "@remix-run/router" "1.21.0" + "@types/cookie" "^0.6.0" + cookie "^1.0.1" + set-cookie-parser "^2.6.0" + turbo-stream "2.4.0" react-select@*, react-select@^5.8.0, react-select@^5.8.3: version "5.8.3" @@ -7000,6 +7007,11 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-cookie-parser@^2.6.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz#3016f150072202dfbe90fadee053573cc89d2943" + integrity sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ== + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -7545,6 +7557,11 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.1, tslib@^2.6 resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +turbo-stream@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/turbo-stream/-/turbo-stream-2.4.0.tgz#1e4fca6725e90fa14ac4adb782f2d3759a5695f0" + integrity sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"