diff --git a/web/modals/push-notif-modal.css b/web/modals/push-notif-modal.css index ae663cbaa..b52238596 100644 --- a/web/modals/push-notif-modal.css +++ b/web/modals/push-notif-modal.css @@ -1,14 +1,4 @@ .container { - padding: 0 40px 32px; - border-radius: 8px; color: var(--modal-fg); -} -.text { font-size: var(--xl-font-20); - padding: 5px 0px 20px; -} -.buttonContainer { - display: flex; - justify-content: flex-end; - gap: 24px; } diff --git a/web/modals/push-notif-modal.react.js b/web/modals/push-notif-modal.react.js index 09764b6b5..45b23680f 100644 --- a/web/modals/push-notif-modal.react.js +++ b/web/modals/push-notif-modal.react.js @@ -1,57 +1,67 @@ // @flow import * as React from 'react'; import { useModalContext } from 'lib/components/modal-provider.react.js'; import Modal from './modal.react.js'; import css from './push-notif-modal.css'; import Button from '../components/button.react.js'; import { useCreatePushSubscription } from '../push-notif/push-notifs-handler.js'; const PushNotifModal: React.ComponentType<{}> = React.memo( function PushNotifModal(): React.Node { const { popModal } = useModalContext(); const createPushSubscription = useCreatePushSubscription(); const onEnable = React.useCallback(async () => { popModal(); if (Notification.permission !== 'granted') { const permissionResult = await Notification.requestPermission(); if (permissionResult !== 'granted') { return; } } await createPushSubscription(); }, [createPushSubscription, popModal]); + const primaryButton = React.useMemo( + () => ( + + Yes + + ), + [onEnable], + ); + + const secondaryButton = React.useMemo( + () => ( + + No + + ), + [popModal], + ); + return ( - - Would you like to enable push notifications? - - - - No - - - Yes - - + Would you like to enable push notifications? ); }, ); export default PushNotifModal;
- Would you like to enable push notifications? -