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

Function onPostCardClick

packages/shared/src/components/Feed.tsx:649–676  ·  view source on GitHub ↗
(
    post,
    index,
    row,
    column,
    isAuxClick,
    event,
  )

Source from the content-addressed store, hash-verified

647 };
648
649 const onPostCardClick: PostClick = async (
650 post,
651 index,
652 row,
653 column,
654 isAuxClick,
655 event,
656 ) => {
657 const isMiddleClick = event?.type === 'auxclick' || event?.button === 1;
658 const isModifierClick = !!(event && (event.ctrlKey || event.metaKey));
659 const readerEligible = isReaderEligiblePost(post);
660 const skipsPostModal = post.type === PostType.LiveRoom;
661 const shouldOpenModal =
662 !skipsPostModal &&
663 !isAuxClick &&
664 !isMiddleClick &&
665 !isModifierClick &&
666 (!shouldUseListFeedLayout || readerEligible);
667 if (shouldOpenModal && shouldUseListFeedLayout && event) {
668 event.preventDefault();
669 }
670 await onPostClick(post, index, row, column, {
671 skipPostUpdate: true,
672 });
673 if (shouldOpenModal) {
674 onPostModalOpen({ index, row, column });
675 }
676 };
677
678 const onCopyLinkClickLogged = (
679 e: React.MouseEvent,

Callers

nothing calls this directly

Calls 1

onPostModalOpenFunction · 0.85

Tested by

no test coverage detected