From e30a252c8aa30b9688a51a96e1b67bf711b121d7 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Fri, 18 Feb 2022 23:19:39 +0300 Subject: [PATCH] Fix type mismatch TypeScript error --- src/components/search/LiveTVSearchResults.tsx | 2 +- src/components/search/SearchResults.tsx | 2 +- src/components/search/SearchSuggestions.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/search/LiveTVSearchResults.tsx b/src/components/search/LiveTVSearchResults.tsx index 9f9874db26..6d43e59ef6 100644 --- a/src/components/search/LiveTVSearchResults.tsx +++ b/src/components/search/LiveTVSearchResults.tsx @@ -27,7 +27,7 @@ type LiveTVSearchResultsProps = { /* * React component to display search result rows for live tv library search */ -const LiveTVSearchResults: FunctionComponent = ({ serverId, parentId, collectionType, query }: LiveTVSearchResultsProps) => { +const LiveTVSearchResults: FunctionComponent = ({ serverId = window.ApiClient.serverId(), parentId, collectionType, query }: LiveTVSearchResultsProps) => { const [ movies, setMovies ] = useState([]); const [ episodes, setEpisodes ] = useState([]); const [ sports, setSports ] = useState([]); diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index e814eba7fa..67ff69501e 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -15,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 }: SearchResultsProps) => { +const SearchResults: FunctionComponent = ({ serverId = window.ApiClient.serverId(), parentId, collectionType, query }: SearchResultsProps) => { const [ movies, setMovies ] = useState([]); const [ shows, setShows ] = useState([]); const [ episodes, setEpisodes ] = useState([]); diff --git a/src/components/search/SearchSuggestions.tsx b/src/components/search/SearchSuggestions.tsx index c13659c60d..6f76d792ef 100644 --- a/src/components/search/SearchSuggestions.tsx +++ b/src/components/search/SearchSuggestions.tsx @@ -23,7 +23,7 @@ type SearchSuggestionsProps = { parentId?: string; } -const SearchSuggestions: FunctionComponent = ({ serverId, parentId }: SearchSuggestionsProps) => { +const SearchSuggestions: FunctionComponent = ({ serverId = window.ApiClient.serverId(), parentId }: SearchSuggestionsProps) => { const [ suggestions, setSuggestions ] = useState([]); useEffect(() => {