|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import Button from 'Components/Link/Button';
|
|
|
|
|
import ModalBody from 'Components/Modal/ModalBody';
|
|
|
|
@ -9,41 +8,36 @@ import { scrollDirections } from 'Helpers/Props';
|
|
|
|
|
import InteractiveSearchConnector from 'InteractiveSearch/InteractiveSearchConnector';
|
|
|
|
|
import translate from 'Utilities/String/translate';
|
|
|
|
|
|
|
|
|
|
function MovieInteractiveSearchModalContent(props) {
|
|
|
|
|
const {
|
|
|
|
|
movieId,
|
|
|
|
|
movieTitle,
|
|
|
|
|
onModalClose
|
|
|
|
|
} = props;
|
|
|
|
|
interface MovieInteractiveSearchModalContentProps {
|
|
|
|
|
movieId: number;
|
|
|
|
|
movieTitle?: string;
|
|
|
|
|
onModalClose(): void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function MovieInteractiveSearchModalContent(
|
|
|
|
|
props: MovieInteractiveSearchModalContentProps
|
|
|
|
|
) {
|
|
|
|
|
const { movieId, movieTitle, onModalClose } = props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<ModalContent onModalClose={onModalClose}>
|
|
|
|
|
<ModalHeader>
|
|
|
|
|
{movieTitle === undefined ?
|
|
|
|
|
translate('InteractiveSearchModalHeader') :
|
|
|
|
|
translate('InteractiveSearchModalHeaderTitle', { title: movieTitle })
|
|
|
|
|
}
|
|
|
|
|
{movieTitle
|
|
|
|
|
? translate('InteractiveSearchModalHeaderTitle', {
|
|
|
|
|
title: movieTitle,
|
|
|
|
|
})
|
|
|
|
|
: translate('InteractiveSearchModalHeader')}
|
|
|
|
|
</ModalHeader>
|
|
|
|
|
|
|
|
|
|
<ModalBody scrollDirection={scrollDirections.BOTH}>
|
|
|
|
|
<InteractiveSearchConnector
|
|
|
|
|
searchPayload={{ movieId }}
|
|
|
|
|
/>
|
|
|
|
|
<InteractiveSearchConnector searchPayload={{ movieId }} />
|
|
|
|
|
</ModalBody>
|
|
|
|
|
|
|
|
|
|
<ModalFooter>
|
|
|
|
|
<Button onPress={onModalClose}>
|
|
|
|
|
{translate('Close')}
|
|
|
|
|
</Button>
|
|
|
|
|
<Button onPress={onModalClose}>{translate('Close')}</Button>
|
|
|
|
|
</ModalFooter>
|
|
|
|
|
</ModalContent>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MovieInteractiveSearchModalContent.propTypes = {
|
|
|
|
|
movieId: PropTypes.number.isRequired,
|
|
|
|
|
movieTitle: PropTypes.string,
|
|
|
|
|
onModalClose: PropTypes.func.isRequired
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default MovieInteractiveSearchModalContent;
|