( props: UseSourceActionsProps, )
| 17 | } |
| 18 | |
| 19 | export const useSourceActions = ( |
| 20 | props: UseSourceActionsProps, |
| 21 | ): UseSourceActionsReturn => { |
| 22 | const { source } = props; |
| 23 | |
| 24 | const { isBlocked, toggleBlock } = useSourceActionsBlock({ source }); |
| 25 | const { isFollowing, toggleFollow } = useSourceActionsFollow({ source }); |
| 26 | const { haveNotificationsOn, onNotify } = useSourceActionsNotify({ |
| 27 | source, |
| 28 | }); |
| 29 | |
| 30 | return { |
| 31 | isBlocked, |
| 32 | toggleBlock, |
| 33 | isFollowing, |
| 34 | toggleFollow, |
| 35 | haveNotificationsOn, |
| 36 | toggleNotify: onNotify, |
| 37 | }; |
| 38 | }; |
| 39 | |
| 40 | export default useSourceActions; |
no test coverage detected