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

Function onCommented

packages/shared/src/components/post/PostEngagements.tsx:98–116  ·  view source on GitHub ↗
(comment: Comment, isNew: boolean)

Source from the content-addressed store, hash-verified

96 };
97
98 const onCommented = (comment: Comment, isNew: boolean) => {
99 if (!isNew) {
100 return;
101 }
102
103 setPermissionNotificationCommentId(comment.id);
104
105 if (
106 isSourcePublicSquad(post.source) &&
107 !post.source?.currentMember &&
108 !isJoinSquadBannerDismissed
109 ) {
110 setJoinNotificationCommentId(comment.id);
111 }
112
113 if (post.source?.type === SourceType.Squad) {
114 completeAction(ActionType.SquadFirstComment);
115 }
116 };
117
118 useEffect(() => {
119 if (shouldOnboardAuthor) {

Callers 4

SubCommentFunction · 0.85
MainCommentFunction · 0.85
onSuccessFunction · 0.85
onSuccessFunction · 0.85

Calls 1

isSourcePublicSquadFunction · 0.90

Tested by

no test coverage detected