({
id,
className,
onRequestClose,
onPreviousPost,
onNextPost,
postPosition,
post,
...props
}: BriefPostModalProps)
| 18 | } |
| 19 | |
| 20 | export default function BriefPostModal({ |
| 21 | id, |
| 22 | className, |
| 23 | onRequestClose, |
| 24 | onPreviousPost, |
| 25 | onNextPost, |
| 26 | postPosition, |
| 27 | post, |
| 28 | ...props |
| 29 | }: BriefPostModalProps): 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 | onRequestClose={onRequestClose} |
| 41 | source={post.source} |
| 42 | loadingClassName="!pb-2 laptop:pb-0" |
| 43 | size={Modal.Size.Large} |
| 44 | postPosition={postPosition} |
| 45 | onPreviousPost={onPreviousPost} |
| 46 | onNextPost={onNextPost} |
| 47 | > |
| 48 | <BriefPostContent |
| 49 | position={position} |
| 50 | post={post} |
| 51 | postPosition={postPosition} |
| 52 | onPreviousPost={onPreviousPost} |
| 53 | onNextPost={onNextPost} |
| 54 | inlineActions |
| 55 | className={{ |
| 56 | onboarding: 'mt-8', |
| 57 | navigation: { actions: 'ml-auto laptop:hidden' }, |
| 58 | fixedNavigation: { |
| 59 | container: classNames( |
| 60 | modalSizeToClassName[Modal.Size.Large], |
| 61 | postModalFixedNavigationClassName, |
| 62 | ), |
| 63 | actions: 'ml-auto', |
| 64 | }, |
| 65 | }} |
| 66 | onClose={onRequestClose} |
| 67 | origin={Origin.BriefModal} |
| 68 | /> |
| 69 | </BasePostModal> |
| 70 | ); |
| 71 | } |
nothing calls this directly
no test coverage detected