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

Function onPostCardClick

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

onPostModalOpenFunction · 0.85

Tested by

no test coverage detected