MCPcopy Create free account
hub / github.com/dailydotdev/apps / useSourceActions

Function useSourceActions

packages/shared/src/hooks/source/useSourceActions.ts:19–38  ·  view source on GitHub ↗
(
  props: UseSourceActionsProps,
)

Source from the content-addressed store, hash-verified

17}
18
19export 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
40export default useSourceActions;

Callers 2

SourceActionsFunction · 0.90
SourceShellPageFunction · 0.90

Calls 3

useSourceActionsBlockFunction · 0.90
useSourceActionsFollowFunction · 0.90
useSourceActionsNotifyFunction · 0.90

Tested by

no test coverage detected