aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/components/NativeInterface.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-04-19 06:49:10 -0700
committerAnton Tananaev <anton@traccar.org>2023-04-19 06:49:10 -0700
commitbddaa24cfc1f2cfb0ce66c938528faff6c846806 (patch)
treed02bf76502d4a6bdb46f7d65cd26fe4b50e12505 /modern/src/common/components/NativeInterface.js
parentfc788646bc720d3cceb639db83094d8540025d3b (diff)
downloadtrackermap-web-bddaa24cfc1f2cfb0ce66c938528faff6c846806.tar.gz
trackermap-web-bddaa24cfc1f2cfb0ce66c938528faff6c846806.tar.bz2
trackermap-web-bddaa24cfc1f2cfb0ce66c938528faff6c846806.zip
Readonly notification token
Diffstat (limited to 'modern/src/common/components/NativeInterface.js')
-rw-r--r--modern/src/common/components/NativeInterface.js2
1 files changed, 1 insertions, 1 deletions
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);