) => {
+ setIsLoading(true);
+ e.preventDefault();
+ window.location.replace(`${baseAPIUrl}${endpoints.LOGIN}`);
+ };
+
+ return !isLoading ? (
+ <>
+ We signed you out due to inactivity
+
+ This is to protect your information. You'll need to enter any information you
+ submitted again.
+
+
+ Sign back in
+
+ >
+ ) : (
+
+ );
+};
+export default SessionExpiredErrorPage;
diff --git a/app/src/router/AppRouter.tsx b/app/src/router/AppRouter.tsx
index 4b93a2323..141f89bc9 100644
--- a/app/src/router/AppRouter.tsx
+++ b/app/src/router/AppRouter.tsx
@@ -23,6 +23,7 @@ import FeedbackPage from '../pages/feedbackPage/FeedbackPage';
import ServerErrorPage from '../pages/serverErrorPage/ServerErrorPage';
import PrivacyPage from '../pages/privacyPage/PrivacyPage';
import LloydGeorgeUploadPage from '../pages/lloydGeorgeUploadPage/LloydGeorgeUploadPage';
+import SessionExpiredErrorPage from '../pages/sessionExpiredErrorPage/SessionExpiredErrorPage';
const {
START,
@@ -33,6 +34,7 @@ const {
UNAUTHORISED_LOGIN,
AUTH_ERROR,
SERVER_ERROR,
+ SESSION_EXPIRED,
FEEDBACK,
LOGOUT,
SEARCH_PATIENT,
@@ -78,6 +80,10 @@ export const routeMap: Routes = {
page: ,
type: ROUTE_TYPE.PUBLIC,
},
+ [SESSION_EXPIRED]: {
+ page: ,
+ type: ROUTE_TYPE.PUBLIC,
+ },
[PRIVACY_POLICY]: {
page: ,
type: ROUTE_TYPE.PUBLIC,
diff --git a/app/src/types/generic/routes.ts b/app/src/types/generic/routes.ts
index 02dd00d84..800eca68e 100644
--- a/app/src/types/generic/routes.ts
+++ b/app/src/types/generic/routes.ts
@@ -9,6 +9,7 @@ export enum routes {
AUTH_ERROR = '/auth-error',
UNAUTHORISED_LOGIN = '/unauthorised-login',
SERVER_ERROR = '/server-error',
+ SESSION_EXPIRED = '/session-expired',
PRIVACY_POLICY = '/privacy-policy',
LOGOUT = '/logout',
FEEDBACK = '/feedback',