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

Function onCommentClick

packages/shared/src/components/post/NewComment.tsx:139–147  ·  view source on GitHub ↗
(origin: Origin)

Source from the content-addressed store, hash-verified

137 }, [post, hasCommentQuery, onShowComment, router, shouldHandleCommentQuery]);
138
139 const onCommentClick = (origin: Origin) => {
140 if (!user) {
141 return showLogin({ trigger: AuthTriggers.NewComment });
142 }
143
144 onShowComment(origin);
145 focusInputById(inputId);
146 return undefined;
147 };
148
149 useImperativeHandle(ref, () => ({
150 onShowInput: onCommentClick,

Callers 4

NewCommentComponentFunction · 0.70
PostCapsuleFunction · 0.70
ActionButtonsV1Function · 0.50
ActionButtonsFunction · 0.50

Calls 1

focusInputByIdFunction · 0.85

Tested by

no test coverage detected