diff --git a/frontend/src/components/User/Profile.tsx b/frontend/src/components/User/Profile.tsx
index 25c4d9318..dd614ef1f 100644
--- a/frontend/src/components/User/Profile.tsx
+++ b/frontend/src/components/User/Profile.tsx
@@ -12,7 +12,7 @@ export default function Profile() {
{
title: 'Logout',
onClick: () => {
- logout({ logoutParams: { returnTo: window.location.origin } });
+ logout({ logoutParams: { returnTo: `${window.location.origin}/readonly` } });
},
},
],
diff --git a/frontend/src/context/UserCredentials.tsx b/frontend/src/context/UserCredentials.tsx
index 061c63e78..581280fac 100644
--- a/frontend/src/context/UserCredentials.tsx
+++ b/frontend/src/context/UserCredentials.tsx
@@ -64,6 +64,7 @@ const UserCredentialsWrapper: FunctionComponent
= (props) => {
useEffect(() => {
if (pathname === '/readonly') {
setIsReadOnlyUser(true);
+ localStorage.setItem('isReadOnlyMode', 'true');
}
}, [pathname]);
return {props.children};