// @flow
import * as React from 'react';
import SettingsRow from 'component/settingsRow';
import { FormField } from 'component/common/form';
import useBrowserNotifications from '$web/component/browserNotificationSettings/use-browser-notifications';
import { BrowserNotificationHints, BrowserNotificationsBlocked } from '$web/component/browserNotificationHints';
const BrowserNotificationSettings = () => {
const { pushSupported, pushEnabled, pushPermission, pushToggle, pushErrorModal } = useBrowserNotifications();
const pushBlocked = pushPermission === 'denied';
const renderHints = () => (!pushSupported ? : null);
const renderBlocked = () => (pushBlocked ? : null);
return (
<>
{renderHints()}
{renderBlocked()}
{pushErrorModal()}
>
);
};
export default BrowserNotificationSettings;