Disable action buttons when no song selected

This commit is contained in:
jeffvli 2023-06-09 04:09:18 -07:00 committed by Jeff
parent 255a131f3b
commit 75403078d2

View File

@ -28,10 +28,13 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
});
};
const isActionsDisabled = !currentSong;
return (
<>
<Button
uppercase
disabled={isActionsDisabled}
variant="subtle"
onClick={() =>
openLyricSearchModal({
@ -66,6 +69,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
</Button>
<Button
uppercase
disabled={isActionsDisabled}
variant="subtle"
onClick={onRemoveLyric}
>