import React from 'react' import { useTranslation } from '../../i18n' import { useWebPush } from '../../hooks/useWebPush' /** * The "Push notifications on this device" card of the Notifications tab. Only * markup: the logic is `useWebPush`, shared with the phone's `MWebPushCard`. * The tab renders it while the admin has the push channel switched on. */ export default function WebPushCard(): React.ReactElement { const { t } = useTranslation() const push = useWebPush() return (

{t('settings.webPush.title')}

{t('settings.webPush.hint')}

{push.stateText && (

{push.stateText}

)} {push.canSwitch && (
)}
) }