mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
reimplement now playing route
This commit is contained in:
@@ -1,21 +1,26 @@
|
|||||||
import type { Song } from '/@/shared/types/domain-types';
|
|
||||||
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
|
|
||||||
|
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
|
|
||||||
|
import { ItemListHandle } from '/@/renderer/components/item-list/types';
|
||||||
|
import { NowPlayingHeader } from '/@/renderer/features/now-playing/components/now-playing-header';
|
||||||
|
import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queue';
|
||||||
|
import { PlayQueueListControls } from '/@/renderer/features/now-playing/components/play-queue-list-controls';
|
||||||
import { AnimatedPage } from '/@/renderer/features/shared/components/animated-page';
|
import { AnimatedPage } from '/@/renderer/features/shared/components/animated-page';
|
||||||
|
import { ItemListKey } from '/@/shared/types/types';
|
||||||
|
|
||||||
const NowPlayingRoute = () => {
|
const NowPlayingRoute = () => {
|
||||||
const queueRef = useRef<null | { grid: AgGridReactType<Song> }>(null);
|
const queueRef = useRef<ItemListHandle | null>(null);
|
||||||
const [search, setSearch] = useState<string | undefined>(undefined);
|
const [search, setSearch] = useState<string | undefined>(undefined);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatedPage>
|
<AnimatedPage>
|
||||||
{/* <VirtualGridContainer>
|
<NowPlayingHeader />
|
||||||
<NowPlayingHeader />
|
<PlayQueueListControls
|
||||||
<PlayQueueListControls tableRef={queueRef} type="nowPlaying" />
|
handleSearch={setSearch}
|
||||||
<PlayQueue ref={queueRef} type="nowPlaying" />
|
searchTerm={search}
|
||||||
</VirtualGridContainer> */}
|
tableRef={queueRef}
|
||||||
|
type={ItemListKey.QUEUE_SONG}
|
||||||
|
/>
|
||||||
|
<PlayQueue listKey={ItemListKey.QUEUE_SONG} searchTerm={search} />
|
||||||
</AnimatedPage>
|
</AnimatedPage>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user