diff --git a/package-lock.json b/package-lock.json index f2840976e8..85e6a31ada 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11730,6 +11730,7 @@ "version": "15.7.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -11864,7 +11865,8 @@ "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "read-file-stdin": { "version": "0.2.1", diff --git a/package.json b/package.json index efb97124a5..8cb8450864 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,6 @@ "native-promise-only": "^0.8.0-a", "page": "^1.11.6", "pdfjs-dist": "2.6.347", - "prop-types": "^15.7.2", "react": "^17.0.2", "react-dom": "^17.0.2", "resize-observer-polyfill": "^1.5.1", diff --git a/src/components/alphaPicker/AlphaPickerComponent.tsx b/src/components/alphaPicker/AlphaPickerComponent.tsx index 79e196e978..0ee97ccd03 100644 --- a/src/components/alphaPicker/AlphaPickerComponent.tsx +++ b/src/components/alphaPicker/AlphaPickerComponent.tsx @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import React, { FunctionComponent, useEffect, useRef, useState } from 'react'; import AlphaPicker from './alphaPicker'; @@ -9,7 +8,7 @@ type AlphaPickerProps = { // React compatibility wrapper component for alphaPicker.js // eslint-disable-next-line @typescript-eslint/no-empty-function -const AlphaPickerComponent: FunctionComponent = ({ onAlphaPicked = () => {} }) => { +const AlphaPickerComponent: FunctionComponent = ({ onAlphaPicked = () => {} }: AlphaPickerProps) => { const [ alphaPicker, setAlphaPicker ] = useState(null); const element = useRef(null); @@ -35,8 +34,4 @@ const AlphaPickerComponent: FunctionComponent = ({ onAlphaPick ); }; -AlphaPickerComponent.propTypes = { - onAlphaPicked: PropTypes.func -}; - export default AlphaPickerComponent; diff --git a/src/components/pages/SearchPage.tsx b/src/components/pages/SearchPage.tsx index 7aa820cc3c..47634dda84 100644 --- a/src/components/pages/SearchPage.tsx +++ b/src/components/pages/SearchPage.tsx @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import React, { FunctionComponent, useState } from 'react'; import SearchFields from '../search/SearchFields'; @@ -40,10 +39,4 @@ const SearchPage: FunctionComponent = ({ serverId, parentId, collec ); }; -SearchPage.propTypes = { - serverId: PropTypes.string, - parentId: PropTypes.string, - collectionType: PropTypes.string -}; - export default SearchPage; diff --git a/src/components/search/LiveTVSearchResults.tsx b/src/components/search/LiveTVSearchResults.tsx index a670b6d152..76e607638e 100644 --- a/src/components/search/LiveTVSearchResults.tsx +++ b/src/components/search/LiveTVSearchResults.tsx @@ -1,5 +1,4 @@ import classNames from 'classnames'; -import PropTypes from 'prop-types'; import React, { FunctionComponent, useEffect, useState } from 'react'; import globalize from '../../scripts/globalize'; @@ -28,7 +27,7 @@ type LiveTVSearchResultsProps = { /* * React component to display search result rows for live tv library search */ -const LiveTVSearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }) => { +const LiveTVSearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }: LiveTVSearchResultsProps) => { const [ movies, setMovies ] = useState([]); const [ episodes, setEpisodes ] = useState([]); const [ sports, setSports ] = useState([]); @@ -187,11 +186,4 @@ const LiveTVSearchResults: FunctionComponent = ({ serv ); }; -LiveTVSearchResults.propTypes = { - serverId: PropTypes.string, - parentId: PropTypes.string, - collectionType: PropTypes.string, - query: PropTypes.string -}; - export default LiveTVSearchResults; diff --git a/src/components/search/SearchFields.tsx b/src/components/search/SearchFields.tsx index 9a8dcd83d3..c2f1ff2515 100644 --- a/src/components/search/SearchFields.tsx +++ b/src/components/search/SearchFields.tsx @@ -1,5 +1,4 @@ import debounce from 'lodash-es/debounce'; -import PropTypes from 'prop-types'; import React, { FunctionComponent, useEffect, useMemo, useRef } from 'react'; import AlphaPicker from '../alphaPicker/AlphaPickerComponent'; @@ -36,7 +35,7 @@ type SearchFieldsProps = { }; // eslint-disable-next-line @typescript-eslint/no-empty-function -const SearchFields: FunctionComponent = ({ onSearch = () => {} }) => { +const SearchFields: FunctionComponent = ({ onSearch = () => {} }: SearchFieldsProps) => { const element = useRef(null); const getSearchInput = () => element?.current?.querySelector('.searchfields-txtSearch'); @@ -88,8 +87,4 @@ const SearchFields: FunctionComponent = ({ onSearch = () => { ); }; -SearchFields.propTypes = { - onSearch: PropTypes.func -}; - export default SearchFields; diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index 21a53640ad..25918ac497 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -1,5 +1,4 @@ import classNames from 'classnames'; -import PropTypes from 'prop-types'; import React, { FunctionComponent, useEffect, useState } from 'react'; import globalize from '../../scripts/globalize'; @@ -16,7 +15,7 @@ type SearchResultsProps = { /* * React component to display search result rows for global search and non-live tv library search */ -const SearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }) => { +const SearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }: SearchResultsProps) => { const [ movies, setMovies ] = useState([]); const [ shows, setShows ] = useState([]); const [ episodes, setEpisodes ] = useState([]); @@ -266,11 +265,4 @@ const SearchResults: FunctionComponent = ({ serverId, parent ); }; -SearchResults.propTypes = { - serverId: PropTypes.string, - parentId: PropTypes.string, - collectionType: PropTypes.string, - query: PropTypes.string -}; - export default SearchResults; diff --git a/src/components/search/SearchResultsRow.tsx b/src/components/search/SearchResultsRow.tsx index 978cc4453e..320604ef3f 100644 --- a/src/components/search/SearchResultsRow.tsx +++ b/src/components/search/SearchResultsRow.tsx @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import React, { FunctionComponent, useEffect, useRef } from 'react'; import cardBuilder from '../cardbuilder/cardBuilder'; @@ -22,7 +21,7 @@ type SearchResultsRowProps = { cardOptions: Record; } -const SearchResultsRow: FunctionComponent = ({ title, items = [], cardOptions = {} }) => { +const SearchResultsRow: FunctionComponent = ({ title, items = [], cardOptions = {} }: SearchResultsRowProps) => { const element = useRef(null); useEffect(() => { @@ -48,10 +47,4 @@ const SearchResultsRow: FunctionComponent = ({ title, ite ); }; -SearchResultsRow.propTypes = { - title: PropTypes.string, - items: PropTypes.array, - cardOptions: PropTypes.object -}; - export default SearchResultsRow; diff --git a/src/components/search/SearchSuggestions.tsx b/src/components/search/SearchSuggestions.tsx index db8b75b219..1cc8d52bdb 100644 --- a/src/components/search/SearchSuggestions.tsx +++ b/src/components/search/SearchSuggestions.tsx @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import React, { FunctionComponent, useEffect, useState } from 'react'; import { appRouter } from '../appRouter'; @@ -24,7 +23,7 @@ type SearchSuggestionsProps = { parentId: string; } -const SearchSuggestions: FunctionComponent = ({ serverId, parentId }) => { +const SearchSuggestions: FunctionComponent = ({ serverId, parentId }: SearchSuggestionsProps) => { const [ suggestions, setSuggestions ] = useState([]); useEffect(() => { @@ -69,9 +68,4 @@ const SearchSuggestions: FunctionComponent = ({ serverId ); }; -SearchSuggestions.propTypes = { - parentId: PropTypes.string, - serverId: PropTypes.string -}; - export default SearchSuggestions;