Changeset View
Changeset View
Standalone View
Standalone View
web/media/multimedia.react.js
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | invariant( | ||||
remove && pendingUpload, | remove && pendingUpload, | ||||
'Multimedia cannot be removed as either remove or pendingUpload ' + | 'Multimedia cannot be removed as either remove or pendingUpload ' + | ||||
'are unspecified', | 'are unspecified', | ||||
); | ); | ||||
remove(pendingUpload.localID); | remove(pendingUpload.localID); | ||||
}; | }; | ||||
onClick: () => void = () => { | onClick: () => void = () => { | ||||
const { pushModal, uri } = this.props; | const { pushModal, type, uri } = this.props; | ||||
pushModal(<MultimediaModal uri={uri} />); | pushModal(<MultimediaModal type={type} uri={uri} />); | ||||
}; | }; | ||||
} | } | ||||
function ConnectedMultimediaContainer(props: BaseProps): React.Node { | function ConnectedMultimediaContainer(props: BaseProps): React.Node { | ||||
const modalContext = useModalContext(); | const modalContext = useModalContext(); | ||||
return <Multimedia {...props} pushModal={modalContext.pushModal} />; | return <Multimedia {...props} pushModal={modalContext.pushModal} />; | ||||
} | } | ||||
export default ConnectedMultimediaContainer; | export default ConnectedMultimediaContainer; |