From 38b06fdd0662ec0bfb46baea15f168f1f5343a61 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 8 Dec 2025 20:04:26 -0800 Subject: [PATCH] fix table configuration on now playing route (#1346) --- .../now-playing/components/now-playing-header.tsx | 9 ++++++--- .../now-playing/components/play-queue-list-controls.tsx | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/renderer/features/now-playing/components/now-playing-header.tsx b/src/renderer/features/now-playing/components/now-playing-header.tsx index 28e3f0d2f..48ea69c61 100644 --- a/src/renderer/features/now-playing/components/now-playing-header.tsx +++ b/src/renderer/features/now-playing/components/now-playing-header.tsx @@ -1,14 +1,17 @@ +import { useTranslation } from 'react-i18next'; + import { PageHeader } from '/@/renderer/components/page-header/page-header'; import { LibraryHeaderBar } from '/@/renderer/features/shared/components/library-header-bar'; export const NowPlayingHeader = () => { - // const currentSong = useCurrentSong(); - // const theme = useTheme(); + const { t } = useTranslation(); return ( - Queue + + {t('page.sidebar.nowPlaying', { postProcess: 'titleCase' })} + ); diff --git a/src/renderer/features/now-playing/components/play-queue-list-controls.tsx b/src/renderer/features/now-playing/components/play-queue-list-controls.tsx index 3effcb894..030afc07b 100644 --- a/src/renderer/features/now-playing/components/play-queue-list-controls.tsx +++ b/src/renderer/features/now-playing/components/play-queue-list-controls.tsx @@ -1,4 +1,4 @@ -import { type MutableRefObject } from 'react'; +import { RefObject } from 'react'; import { useTranslation } from 'react-i18next'; import { SONG_TABLE_COLUMNS } from '/@/renderer/components/item-list/item-table-list/default-columns'; @@ -16,7 +16,7 @@ import { ItemListKey, ListDisplayType } from '/@/shared/types/types'; interface PlayQueueListOptionsProps { handleSearch: (value: string) => void; searchTerm?: string; - tableRef: MutableRefObject; + tableRef: RefObject; type: ItemListKey; } @@ -24,6 +24,7 @@ export const PlayQueueListControls = ({ handleSearch, searchTerm, tableRef, + type, }: PlayQueueListOptionsProps) => { const { t } = useTranslation(); const player = usePlayer(); @@ -144,7 +145,7 @@ export const PlayQueueListControls = ({ value: ListDisplayType.GRID, }, ]} - listKey={ItemListKey.SIDE_QUEUE} + listKey={type} optionsConfig={{ table: { itemsPerPage: { hidden: true },