diff --git a/frontend/src/Series/Details/SeriesDetailsLinks.js b/frontend/src/Series/Details/SeriesDetailsLinks.tsx similarity index 50% rename from frontend/src/Series/Details/SeriesDetailsLinks.js rename to frontend/src/Series/Details/SeriesDetailsLinks.tsx index 1aa67f297..b2a725a68 100644 --- a/frontend/src/Series/Details/SeriesDetailsLinks.js +++ b/frontend/src/Series/Details/SeriesDetailsLinks.tsx @@ -1,23 +1,23 @@ -import PropTypes from 'prop-types'; import React from 'react'; import Label from 'Components/Label'; import Link from 'Components/Link/Link'; import { kinds, sizes } from 'Helpers/Props'; +import Series from 'Series/Series'; import styles from './SeriesDetailsLinks.css'; -function SeriesDetailsLinks(props) { - const { - tvdbId, - tvMazeId, - imdbId, - tmdbId - } = props; +type SeriesDetailsLinksProps = Pick< + Series, + 'tvdbId' | 'tvMazeId' | 'imdbId' | 'tmdbId' +>; + +function SeriesDetailsLinks(props: SeriesDetailsLinksProps) { + const { tvdbId, tvMazeId, imdbId, tmdbId } = props; return (
); } -SeriesDetailsLinks.propTypes = { - tvdbId: PropTypes.number.isRequired, - tvMazeId: PropTypes.number, - imdbId: PropTypes.string, - tmdbId: PropTypes.number -}; - export default SeriesDetailsLinks; diff --git a/frontend/src/Series/Series.ts b/frontend/src/Series/Series.ts index 32773e47a..b35b90d6b 100644 --- a/frontend/src/Series/Series.ts +++ b/frontend/src/Series/Series.ts @@ -73,7 +73,7 @@ interface Series extends ModelBase { firstAired: string; genres: string[]; images: Image[]; - imdbId: string; + imdbId?: string; monitored: boolean; monitorNewItems: MonitorNewItems; network: string;