aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/common/components/BottomMenu.js2
-rw-r--r--modern/src/common/components/NativeInterface.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/common/components/BottomMenu.js b/modern/src/common/components/BottomMenu.js
index cb9e34e1..07fa2e11 100644
--- a/modern/src/common/components/BottomMenu.js
+++ b/modern/src/common/components/BottomMenu.js
@@ -51,7 +51,7 @@ const BottomMenu = () => {
setAnchorEl(null);
const notificationToken = window.localStorage.getItem('notificationToken');
- if (notificationToken) {
+ if (notificationToken && !user.readonly) {
window.localStorage.removeItem('notificationToken');
const tokens = user.attributes.notificationTokens?.split(',') || [];
if (tokens.includes(notificationToken)) {
diff --git a/modern/src/common/components/NativeInterface.js b/modern/src/common/components/NativeInterface.js
index d43b678c..b088de0e 100644
--- a/modern/src/common/components/NativeInterface.js
+++ b/modern/src/common/components/NativeInterface.js
@@ -37,7 +37,7 @@ const NativeInterface = () => {
}, [setNotificationToken]);
useEffectAsync(async () => {
- if (user && notificationToken) {
+ if (user && !user.readonly && notificationToken) {
window.localStorage.setItem('notificationToken', notificationToken);
setNotificationToken(null);