mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove type casting
This commit is contained in:
parent
85e9aff281
commit
c14daafffb
3 changed files with 3 additions and 6 deletions
|
@ -72,8 +72,7 @@ const LiveTVSearchResults: FunctionComponent<LiveTVSearchResultsProps> = ({ serv
|
||||||
setChannels([]);
|
setChannels([]);
|
||||||
|
|
||||||
if (query && collectionType === 'livetv') {
|
if (query && collectionType === 'livetv') {
|
||||||
// TODO: Remove type casting once we're using a properly typed API client
|
const apiClient = ServerConnections.getApiClient(serverId);
|
||||||
const apiClient = (ServerConnections as any).getApiClient(serverId);
|
|
||||||
|
|
||||||
// Movies row
|
// Movies row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, {
|
||||||
|
|
|
@ -99,8 +99,7 @@ const SearchResults: FunctionComponent<SearchResultsProps> = ({ serverId, parent
|
||||||
setPeople([]);
|
setPeople([]);
|
||||||
|
|
||||||
if (query) {
|
if (query) {
|
||||||
// TODO: Remove type casting once we're using a properly typed API client
|
const apiClient = ServerConnections.getApiClient(serverId);
|
||||||
const apiClient = (ServerConnections as any).getApiClient(serverId);
|
|
||||||
|
|
||||||
// Movie libraries
|
// Movie libraries
|
||||||
if (!collectionType || isMovies()) {
|
if (!collectionType || isMovies()) {
|
||||||
|
|
|
@ -27,8 +27,7 @@ const SearchSuggestions: FunctionComponent<SearchSuggestionsProps> = ({ serverId
|
||||||
const [ suggestions, setSuggestions ] = useState([]);
|
const [ suggestions, setSuggestions ] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// TODO: Remove type casting once we're using a properly typed API client
|
const apiClient = ServerConnections.getApiClient(serverId);
|
||||||
const apiClient = (ServerConnections as any).getApiClient(serverId);
|
|
||||||
|
|
||||||
apiClient.getItems(apiClient.getCurrentUserId(), {
|
apiClient.getItems(apiClient.getCurrentUserId(), {
|
||||||
SortBy: 'IsFavoriteOrLiked,Random',
|
SortBy: 'IsFavoriteOrLiked,Random',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue