diff --git a/package-lock.json b/package-lock.json
index ec93ae9de..82ba0bed0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -42,7 +42,7 @@
"react-dom": "^17.0.2",
"react-i18next": "^11.18.6",
"react-router-bootstrap": "^0.26.2",
- "react-router-dom": "^6.4.1",
+ "react-router-dom": "^6.4.2",
"react-scripts": "^5.0.1",
"typescript": "^4.7.2"
},
@@ -3833,9 +3833,9 @@
}
},
"node_modules/@remix-run/router": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.1.tgz",
- "integrity": "sha512-eBV5rvW4dRFOU1eajN7FmYxjAIVz/mRHgUE9En9mBn6m3mulK3WTR5C3iQhL9MZ14rWAq+xOlEaCkDiW0/heOg==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
+ "integrity": "sha512-GRSOFhJzjGN+d4sKHTMSvNeUPoZiDHWmRnXfzaxrqe7dE/Nzlc8BiMSJdLDESZlndM7jIUrZ/F4yWqVYlI0rwQ==",
"dev": true,
"engines": {
"node": ">=14"
@@ -18613,12 +18613,12 @@
}
},
"node_modules/react-router": {
- "version": "6.4.1",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.1.tgz",
- "integrity": "sha512-OJASKp5AykDWFewgWUim1vlLr7yfD4vO/h+bSgcP/ix8Md+LMHuAjovA74MQfsfhQJGGN1nHRhwS5qQQbbBt3A==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.2.tgz",
+ "integrity": "sha512-Rb0BAX9KHhVzT1OKhMvCDMw776aTYM0DtkxqUBP8dNBom3mPXlfNs76JNGK8wKJ1IZEY1+WGj+cvZxHVk/GiKw==",
"dev": true,
"dependencies": {
- "@remix-run/router": "1.0.1"
+ "@remix-run/router": "1.0.2"
},
"engines": {
"node": ">=14"
@@ -18641,13 +18641,13 @@
}
},
"node_modules/react-router-dom": {
- "version": "6.4.1",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.1.tgz",
- "integrity": "sha512-MY7NJCrGNVJtGp8ODMOBHu20UaIkmwD2V3YsAOUQoCXFk7Ppdwf55RdcGyrSj+ycSL9Uiwrb3gTLYSnzcRoXww==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.2.tgz",
+ "integrity": "sha512-yM1kjoTkpfjgczPrcyWrp+OuQMyB1WleICiiGfstnQYo/S8hPEEnVjr/RdmlH6yKK4Tnj1UGXFSa7uwAtmDoLQ==",
"dev": true,
"dependencies": {
- "@remix-run/router": "1.0.1",
- "react-router": "6.4.1"
+ "@remix-run/router": "1.0.2",
+ "react-router": "6.4.2"
},
"engines": {
"node": ">=14"
@@ -25478,9 +25478,9 @@
}
},
"@remix-run/router": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.1.tgz",
- "integrity": "sha512-eBV5rvW4dRFOU1eajN7FmYxjAIVz/mRHgUE9En9mBn6m3mulK3WTR5C3iQhL9MZ14rWAq+xOlEaCkDiW0/heOg==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz",
+ "integrity": "sha512-GRSOFhJzjGN+d4sKHTMSvNeUPoZiDHWmRnXfzaxrqe7dE/Nzlc8BiMSJdLDESZlndM7jIUrZ/F4yWqVYlI0rwQ==",
"dev": true
},
"@restart/hooks": {
@@ -36341,12 +36341,12 @@
"dev": true
},
"react-router": {
- "version": "6.4.1",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.1.tgz",
- "integrity": "sha512-OJASKp5AykDWFewgWUim1vlLr7yfD4vO/h+bSgcP/ix8Md+LMHuAjovA74MQfsfhQJGGN1nHRhwS5qQQbbBt3A==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.2.tgz",
+ "integrity": "sha512-Rb0BAX9KHhVzT1OKhMvCDMw776aTYM0DtkxqUBP8dNBom3mPXlfNs76JNGK8wKJ1IZEY1+WGj+cvZxHVk/GiKw==",
"dev": true,
"requires": {
- "@remix-run/router": "1.0.1"
+ "@remix-run/router": "1.0.2"
}
},
"react-router-bootstrap": {
@@ -36359,13 +36359,13 @@
}
},
"react-router-dom": {
- "version": "6.4.1",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.1.tgz",
- "integrity": "sha512-MY7NJCrGNVJtGp8ODMOBHu20UaIkmwD2V3YsAOUQoCXFk7Ppdwf55RdcGyrSj+ycSL9Uiwrb3gTLYSnzcRoXww==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.2.tgz",
+ "integrity": "sha512-yM1kjoTkpfjgczPrcyWrp+OuQMyB1WleICiiGfstnQYo/S8hPEEnVjr/RdmlH6yKK4Tnj1UGXFSa7uwAtmDoLQ==",
"dev": true,
"requires": {
- "@remix-run/router": "1.0.1",
- "react-router": "6.4.1"
+ "@remix-run/router": "1.0.2",
+ "react-router": "6.4.2"
}
},
"react-scripts": {
diff --git a/package.json b/package.json
index 35307df94..a6218d8d4 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"react-dom": "^17.0.2",
"react-i18next": "^11.18.6",
"react-router-bootstrap": "^0.26.2",
- "react-router-dom": "^6.4.1",
+ "react-router-dom": "^6.4.2",
"react-scripts": "^5.0.1",
"typescript": "^4.7.2"
},
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 7e33f320b..11a63e88a 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -1,7 +1,14 @@
import { useCallback } from 'react'
import * as rb from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
-import { createBrowserRouter, createRoutesFromElements, Navigate, Route, RouterProvider } from 'react-router-dom'
+import {
+ createBrowserRouter,
+ createRoutesFromElements,
+ Navigate,
+ Route,
+ RouterProvider,
+ Outlet,
+} from 'react-router-dom'
import { routes } from '../constants/routes'
import { useSessionConnectionError } from '../context/ServiceInfoContext'
import { useSettings } from '../context/SettingsContext'
@@ -48,13 +55,9 @@ export default function App() {
<>
- {sessionConnectionError && (
-
- {t('app.alert_no_connection', { connectionError: sessionConnectionError.message })}.
-
- )}
-
-
+
+
+
>
@@ -66,11 +69,22 @@ export default function App() {
* that it stays visible in case the backend becomes unavailable.
*/}
} />
- {/**
- * This section defines all routes that are displayed only if the backend is reachable.
- */}
- {!sessionConnectionError && (
+
+ {sessionConnectionError ? (
+
+ {t('app.alert_no_connection', { connectionError: sessionConnectionError.message })}.
+
+ }
+ />
+ ) : (
<>
+ {/**
+ * This section defines all routes that are displayed only if the backend is reachable.
+ */}
{
+const Layout = ({ variant, children }: PropsWithChildren) => {
return (
-
-
-
+ {children}
)
}