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

Function onPostCardClick

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

Source from the content-addressed store, hash-verified

699 };
700
701 const onPostCardClick: PostClick = async (
702 post,
703 index,
704 row,
705 column,
706 isAuxClick,
707 event,
708 ) => {
709 const isMiddleClick = event?.type === 'auxclick' || event?.button === 1;
710 const isModifierClick = !!(event && (event.ctrlKey || event.metaKey));
711 const readerEligible = isReaderEligiblePost(post);
712 const shouldOpenModal =
713 !isAuxClick &&
714 !isMiddleClick &&
715 !isModifierClick &&
716 (!shouldUseListFeedLayout || readerEligible);
717 if (shouldOpenModal && shouldUseListFeedLayout && event) {
718 event.preventDefault();
719 }
720 await onPostClick(post, index, row, column, {
721 skipPostUpdate: true,
722 });
723 if (shouldOpenModal) {
724 onPostModalOpen({ index, row, column });
725 }
726 };
727
728 const onCopyLinkClickLogged = (
729 e: React.MouseEvent,

Callers

nothing calls this directly

Calls 1

onPostModalOpenFunction · 0.85

Tested by

no test coverage detected