From 54b18601b884061e9ac6afc23ef63691d2dde02d Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 19 Dec 2023 14:59:32 -0800 Subject: [PATCH] Remove playlist detail route file --- .../routes/playlist-detail-route.tsx | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/renderer/features/playlists/routes/playlist-detail-route.tsx diff --git a/src/renderer/features/playlists/routes/playlist-detail-route.tsx b/src/renderer/features/playlists/routes/playlist-detail-route.tsx deleted file mode 100644 index 92a7670b..00000000 --- a/src/renderer/features/playlists/routes/playlist-detail-route.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { useRef } from 'react'; -import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact'; -import { useParams } from 'react-router'; -import { LibraryItem } from '/@/renderer/api/types'; -import { NativeScrollArea, Spinner } from '/@/renderer/components'; -import { usePlayQueueAdd } from '/@/renderer/features/player'; -import { PlaylistDetailContent } from '/@/renderer/features/playlists/components/playlist-detail-content'; -import { PlaylistDetailHeader } from '/@/renderer/features/playlists/components/playlist-detail-header'; -import { usePlaylistDetail } from '/@/renderer/features/playlists/queries/playlist-detail-query'; -import { AnimatedPage, LibraryHeaderBar } from '/@/renderer/features/shared'; -import { useFastAverageColor } from '/@/renderer/hooks'; -import { usePlayButtonBehavior } from '/@/renderer/store/settings.store'; -import { useCurrentServer } from '../../../store/auth.store'; - -const PlaylistDetailRoute = () => { - const tableRef = useRef(null); - const scrollAreaRef = useRef(null); - const headerRef = useRef(null); - const { playlistId } = useParams() as { playlistId: string }; - const server = useCurrentServer(); - - const detailQuery = usePlaylistDetail({ query: { id: playlistId }, serverId: server?.id }); - const { color: background, colorId } = useFastAverageColor({ - algorithm: 'sqrt', - id: playlistId, - src: detailQuery?.data?.imageUrl, - srcLoaded: !detailQuery?.isLoading, - }); - - const handlePlayQueueAdd = usePlayQueueAdd(); - const playButtonBehavior = usePlayButtonBehavior(); - - const handlePlay = () => { - handlePlayQueueAdd?.({ - byItemType: { - id: [playlistId], - type: LibraryItem.PLAYLIST, - }, - playType: playButtonBehavior, - }); - }; - - if (!background || colorId !== playlistId) { - return ; - } - - return ( - - - - - {detailQuery?.data?.name} - - - ), - offset: 200, - target: headerRef, - }} - > - - - - - ); -}; - -export default PlaylistDetailRoute;