diff --git a/web/components/modals/BrowserNotifyModal/BrowserNotifyModal.tsx b/web/components/modals/BrowserNotifyModal/BrowserNotifyModal.tsx index 4673bdcb8..27ebdef9f 100644 --- a/web/components/modals/BrowserNotifyModal/BrowserNotifyModal.tsx +++ b/web/components/modals/BrowserNotifyModal/BrowserNotifyModal.tsx @@ -15,8 +15,6 @@ const NotificationsNotSupported = () => (
Browser notifications are not supported in your browser.
); -const NotificationsEnabled = () =>
Notifications enabled
; - export type PermissionPopupPreviewProps = { start: () => void; }; @@ -58,6 +56,15 @@ const PermissionPopupPreview: FC = ({ start }) => ( ); +const NotificationsEnabled = () => ( +
+ Notifications are enabled + To disable push notifications from {window.location.hostname.toString()} access your browser + permissions for this site and turn off notifications. + Learn more. +
+); + export const BrowserNotifyModal = () => { const [error, setError] = useState(null); const accessToken = useRecoilValue(accessTokenAtom); @@ -73,12 +80,13 @@ export const BrowserNotifyModal = () => { const browserPushSupported = browser.enabled && isPushNotificationSupported(); + // If notification permissions are granted, show user info how to disable them if (notificationsPermitted) { return ; } const startBrowserPushRegistration = async () => { - // If it's already denied or granted, don't do anything. + // If notification permissions are already denied or granted, don't do anything. if (isPushNotificationSupported() && Notification.permission !== 'default') { return; }