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

Function onPostCardClick

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

Source from the content-addressed store, hash-verified

580 };
581
582 const onPostCardClick: PostClick = async (
583 post,
584 index,
585 row,
586 column,
587 isAuxClick,
588 event,
589 ) => {
590 const isMiddleClick = event?.type === 'auxclick' || event?.button === 1;
591 const isModifierClick = !!(event && (event.ctrlKey || event.metaKey));
592 const readerEligible = isReaderEligiblePost(post);
593 const skipsPostModal = post.type === PostType.LiveRoom;
594 const shouldOpenModal =
595 !skipsPostModal &&
596 !isAuxClick &&
597 !isMiddleClick &&
598 !isModifierClick &&
599 (!shouldUseListFeedLayout || readerEligible);
600 if (shouldOpenModal && shouldUseListFeedLayout && event) {
601 event.preventDefault();
602 }
603 await onPostClick(post, index, row, column, {
604 skipPostUpdate: true,
605 });
606 if (shouldOpenModal) {
607 onPostModalOpen({ index, row, column });
608 }
609 };
610
611 const onCopyLinkClickLogged = (
612 e: React.MouseEvent,

Callers

nothing calls this directly

Calls 1

onPostModalOpenFunction · 0.85

Tested by

no test coverage detected