replace remaining legacy playqueue add functions

This commit is contained in:
jeffvli
2025-11-18 17:05:20 -08:00
parent ef78196d1e
commit e986557d87
15 changed files with 171 additions and 227 deletions
@@ -3,7 +3,7 @@ import { Fragment, useCallback, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { generatePath, useNavigate } from 'react-router';
import { usePlayQueueAdd } from '/@/renderer/features/player/hooks/use-playqueue-add';
import { usePlayer } from '/@/renderer/features/player/context/player-context';
import { searchQueries } from '/@/renderer/features/search/api/search-api';
import { Command, CommandPalettePages } from '/@/renderer/features/search/components/command';
import { CommandItemSelectable } from '/@/renderer/features/search/components/command-item-selectable';
@@ -70,8 +70,6 @@ export const CommandPalette = ({ modalProps }: CommandPaletteProps) => {
const showArtistGroup = isHome && Boolean(query && data && data?.albumArtists?.length > 0);
const showTrackGroup = isHome && Boolean(query && data && data?.songs?.length > 0);
const handlePlayQueueAdd = usePlayQueueAdd();
return (
<Modal
{...modalProps}
@@ -169,7 +167,6 @@ export const CommandPalette = ({ modalProps }: CommandPaletteProps) => {
>
{({ isHighlighted }) => (
<LibraryCommandItem
handlePlayQueueAdd={handlePlayQueueAdd}
id={album.id}
imageUrl={album.imageUrl}
isHighlighted={isHighlighted}
@@ -203,7 +200,6 @@ export const CommandPalette = ({ modalProps }: CommandPaletteProps) => {
{({ isHighlighted }) => (
<LibraryCommandItem
disabled={artist?.albumCount === 0}
handlePlayQueueAdd={handlePlayQueueAdd}
id={artist.id}
imageUrl={artist.imageUrl}
isHighlighted={isHighlighted}
@@ -241,7 +237,6 @@ export const CommandPalette = ({ modalProps }: CommandPaletteProps) => {
>
{({ isHighlighted }) => (
<LibraryCommandItem
handlePlayQueueAdd={handlePlayQueueAdd}
id={song.id}
imageUrl={song.imageUrl}
isHighlighted={isHighlighted}