mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-03 03:50:02 +03:00
Remove unnecessary passing of fake livetv id
This commit is contained in:
@@ -34,7 +34,6 @@ const PageTabContent: FC<PageTabContentProps> = ({ parentId, currentTab }) => {
|
||||
if (currentTab.viewType === LibraryTab.Programs || currentTab.viewType === LibraryTab.Recordings || currentTab.viewType === LibraryTab.Schedule) {
|
||||
return (
|
||||
<ProgramsSectionView
|
||||
parentId={parentId}
|
||||
sectionType={
|
||||
currentTab.sectionsView?.programSections ?? []
|
||||
}
|
||||
|
||||
@@ -9,22 +9,19 @@ import { ItemAction } from 'constants/itemAction';
|
||||
import { useApi } from 'hooks/useApi';
|
||||
import { useGetProgramsSectionsWithItems, useGetTimers } from 'hooks/useFetchItems';
|
||||
import globalize from 'lib/globalize';
|
||||
import type { ParentId } from 'types/library';
|
||||
import type { Section, SectionType } from 'types/sections';
|
||||
|
||||
interface ProgramsSectionViewProps {
|
||||
parentId: ParentId;
|
||||
sectionType: SectionType[];
|
||||
isUpcomingRecordingsEnabled: boolean | undefined
|
||||
}
|
||||
|
||||
const ProgramsSectionView: FC<ProgramsSectionViewProps> = ({
|
||||
parentId,
|
||||
sectionType,
|
||||
isUpcomingRecordingsEnabled = false
|
||||
}) => {
|
||||
const { __legacyApiClient__ } = useApi();
|
||||
const { isLoading, data: sectionsWithItems, refetch } = useGetProgramsSectionsWithItems(parentId, sectionType);
|
||||
const { isLoading, data: sectionsWithItems, refetch } = useGetProgramsSectionsWithItems(sectionType);
|
||||
const {
|
||||
isLoading: isUpcomingRecordingsLoading,
|
||||
data: upcomingRecordings
|
||||
|
||||
@@ -954,14 +954,13 @@ export const useGetSuggestionSectionsWithItems = (
|
||||
};
|
||||
|
||||
export const useGetProgramsSectionsWithItems = (
|
||||
parentId: ParentId,
|
||||
programSectionType: SectionType[]
|
||||
) => {
|
||||
const currentApi = useApi();
|
||||
const sections = getProgramSections();
|
||||
return useQuery({
|
||||
queryKey: ['ProgramSectionWithItems', { programSectionType }],
|
||||
queryFn: ({ signal }) => getSectionsWithItems(currentApi, parentId, sections, programSectionType, { signal }),
|
||||
queryFn: ({ signal }) => getSectionsWithItems(currentApi, undefined, sections, programSectionType, { signal }),
|
||||
enabled: !!currentApi.api && !!currentApi.user?.Id
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user