add current song styles to rowIndex and title columns

This commit is contained in:
jeffvli
2025-11-13 13:31:57 -08:00
parent 8e6beeed98
commit 76d8b9c894
4 changed files with 196 additions and 3 deletions
@@ -0,0 +1,14 @@
import { useMemo } from 'react';
import { usePlayerSong } from '/@/renderer/store';
import { QueueSong } from '/@/shared/types/domain-types';
export const useIsCurrentSong = (song: QueueSong) => {
const currentSong = usePlayerSong();
const isActive = useMemo(() => {
return song._uniqueId === currentSong?._uniqueId;
}, [song._uniqueId, currentSong?._uniqueId]);
return { isActive };
};