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

Function PollPostModal

packages/shared/src/components/modals/PollPostModal.tsx:20–72  ·  view source on GitHub ↗
({
  id,
  className,
  onRequestClose,
  onPreviousPost,
  onNextPost,
  postPosition,
  post,
  ...props
}: PollPostModalProps)

Source from the content-addressed store, hash-verified

18}
19
20export default function PollPostModal({
21 id,
22 className,
23 onRequestClose,
24 onPreviousPost,
25 onNextPost,
26 postPosition,
27 post,
28 ...props
29}: PollPostModalProps): ReactElement {
30 const { position, onLoad } = usePostNavigationPosition({
31 isDisplayed: props.isOpen,
32 offset: 0,
33 });
34
35 return (
36 <BasePostModal
37 {...props}
38 post={post}
39 onAfterOpen={onLoad}
40 size={Modal.Size.XLarge}
41 navigationContentOwnsActions
42 onRequestClose={onRequestClose}
43 source={post.source}
44 loadingClassName="!pb-2 tablet:pb-0"
45 postPosition={postPosition}
46 onPreviousPost={onPreviousPost}
47 onNextPost={onNextPost}
48 >
49 <PollPostContent
50 position={position}
51 post={post}
52 onPreviousPost={onPreviousPost}
53 onNextPost={onNextPost}
54 postPosition={postPosition}
55 inlineActions
56 onClose={onRequestClose}
57 origin={Origin.ArticleModal}
58 className={{
59 fixedNavigation: {
60 container: classNames(
61 '!w-[inherit]',
62 postModalFixedNavigationClassName,
63 ),
64 actions: 'ml-auto',
65 },
66 navigation: { actions: 'ml-auto tablet:hidden' },
67 onboarding: 'mb-0 mt-8',
68 }}
69 />
70 </BasePostModal>
71 );
72}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected