deps: react-router-dom 4 -> 6 (history 5, react-router-bootstrap 0.26)

Removes the Router/Switch/Route/Link/LinkContainer legacy-context
warnings. Keeps the shared history singleton (used outside React by
NotificationsObserver + Utils/location) via unstable_HistoryRouter, and
bridges v6 hooks back to v4-shaped history/match/location props with a
new withRouterCompat HOC so the ~20 class pages stay untouched.

- <Switch> -> <Routes>, component= -> element=
- Authenticated/Public -> guard components (children or <Navigate replace>)
- LocationListener -> useLocation + useEffect function
- regex route /fire/:type(active|archive|alert)/:id -> /fire/:type/:id
- history.listen callback is ({ location }) in history v5

Browser-verified: SPA nav, /subscriptions->/login auth redirect,
deep-link /fire/archive/:id (params), browser back/forward. REST smoke
byte-identical.
This commit is contained in:
vjrj 2026-07-21 13:00:15 +02:00
parent a1a1b9a801
commit e2d13ca64c
10 changed files with 177 additions and 212 deletions

View file

@ -22,7 +22,7 @@
"google-maps": "^3.2.1",
"google-maps-image-api-url": "^1.0.3",
"handlebars": "^4.0.11",
"history": "^4.7.2",
"history": "^5.3.0",
"html5-device-mockups": "^3.2.0",
"i18next": "^23.16.8",
"i18next-browser-languagedetector": "^8.2.1",
@ -73,8 +73,8 @@
"react-places-autocomplete": "^5.4.3",
"react-progress-bar.js": "^0.2.3",
"react-resize-detector": "^1.1.0",
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^4.2.2",
"react-router-bootstrap": "^0.26.3",
"react-router-dom": "^6.30.4",
"react-share": "^2.0.0",
"simpl-schema": "^1.5.0",
"simple-line-icons": "^2.4.1",