strong-testimonials
/
admin
/
wpchill
/
apps
/
notification-system
/
notification
/
notifications-footer.jsx
notification-actions.jsx
9 months ago
notifications-footer.jsx
1 year ago
notifications-head.jsx
1 year ago
notifications-list.jsx
1 year ago
notifications-footer.jsx
20 lines
| 1 | import { __ } from '@wordpress/i18n'; |
| 2 | import { useWpchillState } from '../state/use-wpchill-state'; |
| 3 | import { setClosedBubble } from '../state/actions'; |
| 4 | import { Button } from '@wordpress/components'; |
| 5 | import { useNotificationsDismiss } from '../query/useNotificationsDismiss'; |
| 6 | export function NotificationsFooter() { |
| 7 | const { dispatch } = useWpchillState(); |
| 8 | const mutation = useNotificationsDismiss(); |
| 9 | const closePanel = () => { |
| 10 | dispatch( setClosedBubble( true ) ); |
| 11 | mutation.mutate(); |
| 12 | }; |
| 13 | |
| 14 | return ( |
| 15 | <Button className="dismiss_all_notifications" onClick={ closePanel }> |
| 16 | { __( ' Dismiss All Notifications', 'strong-testimonials' ) } |
| 17 | </Button> |
| 18 | ); |
| 19 | } |
| 20 |