mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Disable action buttons when no song selected
This commit is contained in:
parent
255a131f3b
commit
75403078d2
1 changed files with 4 additions and 0 deletions
|
|
@ -28,10 +28,13 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isActionsDisabled = !currentSong;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
uppercase
|
uppercase
|
||||||
|
disabled={isActionsDisabled}
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
openLyricSearchModal({
|
openLyricSearchModal({
|
||||||
|
|
@ -66,6 +69,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
uppercase
|
uppercase
|
||||||
|
disabled={isActionsDisabled}
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
onClick={onRemoveLyric}
|
onClick={onRemoveLyric}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue