diff --git a/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx b/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx index 2248eb183e..2fb0ae6c98 100644 --- a/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx +++ b/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx @@ -65,7 +65,7 @@ interface RowItemData { } function Row({ index, style, data }: ListChildComponentProps) { - const { items, columns, onMovieSelect } = data; + const { items, onMovieSelect } = data; const movie = index >= items.length ? null : items[index]; const handlePress = useCallback(() => { @@ -88,13 +88,11 @@ function Row({ index, style, data }: ListChildComponentProps) { onPress={handlePress} > ); diff --git a/frontend/src/InteractiveImport/Movie/SelectMovieRow.js b/frontend/src/InteractiveImport/Movie/SelectMovieRow.js deleted file mode 100644 index 5fdcc32f2a..0000000000 --- a/frontend/src/InteractiveImport/Movie/SelectMovieRow.js +++ /dev/null @@ -1,55 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import Label from 'Components/Label'; -import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell'; -import styles from './SelectMovieRow.css'; - -class SelectMovieRow extends Component { - - // - // Listeners - - onPress = () => { - this.props.onMovieSelect(this.props.id); - }; - - // - // Render - - render() { - return ( - <> - - {this.props.title} - - - - {this.props.year} - - - - { - this.props.imdbId ? - : - null - } - - - - - - - ); - } -} - -SelectMovieRow.propTypes = { - id: PropTypes.number.isRequired, - title: PropTypes.string.isRequired, - tmdbId: PropTypes.number.isRequired, - imdbId: PropTypes.string, - year: PropTypes.number.isRequired, - onMovieSelect: PropTypes.func.isRequired -}; - -export default SelectMovieRow; diff --git a/frontend/src/InteractiveImport/Movie/SelectMovieRow.tsx b/frontend/src/InteractiveImport/Movie/SelectMovieRow.tsx new file mode 100644 index 0000000000..643262810b --- /dev/null +++ b/frontend/src/InteractiveImport/Movie/SelectMovieRow.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import Label from 'Components/Label'; +import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell'; +import styles from './SelectMovieRow.css'; + +interface SelectMovieRowProps { + title: string; + tmdbId: number; + imdbId?: string; + year: number; +} + +function SelectMovieRow({ title, year, tmdbId, imdbId }: SelectMovieRowProps) { + return ( + <> + + {title} + + + {year} + + + {imdbId ? : null} + + + + + + + ); +} + +export default SelectMovieRow;