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

Function onPostCardClick

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

Source from the content-addressed store, hash-verified

595 };
596
597 const onPostCardClick: PostClick = async (
598 post,
599 index,
600 row,
601 column,
602 isAuxClick,
603 event,
604 ) => {
605 const isMiddleClick = event?.type === 'auxclick' || event?.button === 1;
606 const isModifierClick = !!(event && (event.ctrlKey || event.metaKey));
607 const readerEligible = isReaderEligiblePost(post);
608 const skipsPostModal = post.type === PostType.LiveRoom;
609 const shouldOpenModal =
610 !skipsPostModal &&
611 !isAuxClick &&
612 !isMiddleClick &&
613 !isModifierClick &&
614 (!shouldUseListFeedLayout || readerEligible);
615 if (shouldOpenModal && shouldUseListFeedLayout && event) {
616 event.preventDefault();
617 }
618 await onPostClick(post, index, row, column, {
619 skipPostUpdate: true,
620 });
621 if (shouldOpenModal) {
622 onPostModalOpen({ index, row, column });
623 }
624 };
625
626 const onCopyLinkClickLogged = (
627 e: React.MouseEvent,

Callers

nothing calls this directly

Calls 1

onPostModalOpenFunction · 0.85

Tested by

no test coverage detected