diff --git a/src/routes/movies/CollectionsView.tsx b/src/routes/movies/CollectionsView.tsx index 8234ee8b7b..6e94ad2b96 100644 --- a/src/routes/movies/CollectionsView.tsx +++ b/src/routes/movies/CollectionsView.tsx @@ -1,12 +1,9 @@ import React, { FC, useCallback } from 'react'; import ViewItemsContainer from '../../components/common/ViewItemsContainer'; +import { LibraryViewProps } from '../../types/interface'; -interface CollectionsViewI { - topParentId: string | null; -} - -const CollectionsView: FC = ({ topParentId }) => { +const CollectionsView: FC = ({ topParentId }) => { const getBasekey = useCallback(() => { return 'collections'; }, []); diff --git a/src/routes/movies/FavoritesView.tsx b/src/routes/movies/FavoritesView.tsx index 68b1d4fcc3..cf6969bbb2 100644 --- a/src/routes/movies/FavoritesView.tsx +++ b/src/routes/movies/FavoritesView.tsx @@ -1,12 +1,9 @@ import React, { FC, useCallback } from 'react'; import ViewItemsContainer from '../../components/common/ViewItemsContainer'; +import { LibraryViewProps } from '../../types/interface'; -interface FavoritesViewI { - topParentId: string | null; -} - -const FavoritesView: FC = ({ topParentId }) => { +const FavoritesView: FC = ({ topParentId }) => { const getBasekey = useCallback(() => { return 'favorites'; }, []); diff --git a/src/routes/movies/GenresView.tsx b/src/routes/movies/GenresView.tsx index f3d997c705..041968e4b1 100644 --- a/src/routes/movies/GenresView.tsx +++ b/src/routes/movies/GenresView.tsx @@ -4,13 +4,9 @@ import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from 're import loading from '../../components/loading/loading'; import * as userSettings from '../../scripts/settings/userSettings'; import GenresItemsContainer from '../../components/common/GenresItemsContainer'; -import { Query } from '../../types/interface'; +import { LibraryViewProps, Query } from '../../types/interface'; -interface GenresViewI { - topParentId: string | null; -} - -const GenresView: FC = ({ topParentId }) => { +const GenresView: FC = ({ topParentId }) => { const [ itemsResult, setItemsResult ] = useState({}); const element = useRef(null); diff --git a/src/routes/movies/MoviesView.tsx b/src/routes/movies/MoviesView.tsx index 660a108a3b..4103eb908c 100644 --- a/src/routes/movies/MoviesView.tsx +++ b/src/routes/movies/MoviesView.tsx @@ -1,12 +1,9 @@ import React, { FC, useCallback } from 'react'; import ViewItemsContainer from '../../components/common/ViewItemsContainer'; +import { LibraryViewProps } from '../../types/interface'; -interface MoviesViewI { - topParentId: string | null; -} - -const MoviesView: FC = ({ topParentId }) => { +const MoviesView: FC = ({ topParentId }) => { const getBasekey = useCallback(() => { return 'movies'; }, []); diff --git a/src/routes/movies/SuggestionsView.tsx b/src/routes/movies/SuggestionsView.tsx index 577c723041..605d40062c 100644 --- a/src/routes/movies/SuggestionsView.tsx +++ b/src/routes/movies/SuggestionsView.tsx @@ -7,12 +7,9 @@ import dom from '../../scripts/dom'; import globalize from '../../scripts/globalize'; import RecommendationContainer from '../../components/common/RecommendationContainer'; import SectionContainer from '../../components/common/SectionContainer'; +import { LibraryViewProps } from '../../types/interface'; -interface SuggestionsViewI { - topParentId: string | null; -} - -const SuggestionsView: FC = ({topParentId}) => { +const SuggestionsView: FC = ({topParentId}) => { const [ latestItems, setLatestItems ] = useState([]); const [ resumeResult, setResumeResult ] = useState({}); const [ recommendations, setRecommendations ] = useState([]); @@ -86,7 +83,7 @@ const SuggestionsView: FC = ({topParentId}) => { } else if (screenWidth >= 1200) { itemLimit = 6; } - const url = window.window.ApiClient.getUrl('Movies/Recommendations', { + const url = window.ApiClient.getUrl('Movies/Recommendations', { userId: userId, categoryLimit: 6, ItemLimit: itemLimit, diff --git a/src/routes/movies/TrailersView.tsx b/src/routes/movies/TrailersView.tsx index 43713684d1..9e11d41b94 100644 --- a/src/routes/movies/TrailersView.tsx +++ b/src/routes/movies/TrailersView.tsx @@ -2,12 +2,9 @@ import React, { FC, useCallback } from 'react'; import ViewItemsContainer from '../../components/common/ViewItemsContainer'; +import { LibraryViewProps } from '../../types/interface'; -interface TrailersViewI { - topParentId: string | null; -} - -const TrailersView: FC = ({ topParentId }) => { +const TrailersView: FC = ({ topParentId }) => { const getBasekey = useCallback(() => { return 'trailers'; }, []); diff --git a/src/types/interface.ts b/src/types/interface.ts index 7afdbeab8c..67c6565e27 100644 --- a/src/types/interface.ts +++ b/src/types/interface.ts @@ -116,3 +116,7 @@ export interface CardOptions { containerClass?: string; noItemsMessage?: string; } + +export interface LibraryViewProps { + topParentId: string | null; +}