Removes reasonsWhyNotReady

The popover doesn't play well with the button being disabled, and I don't think adds any value.
This commit is contained in:
psychedelicious 2022-11-20 19:36:12 +11:00 committed by blessedcoolant
parent b72b61b790
commit 5ed6a31b97

View File

@ -1,4 +1,4 @@
import { ListItem, UnorderedList } from '@chakra-ui/react';
import { Flex, ListItem, Tooltip, UnorderedList } from '@chakra-ui/react';
import { useHotkeys } from 'react-hotkeys-hook';
import { FaPlay } from 'react-icons/fa';
import { readinessSelector } from 'app/selectors/readinessSelector';
@ -36,7 +36,7 @@ export default function InvokeButton(props: InvokeButton) {
[isReady, activeTabName]
);
const buttonComponent = (
return (
<div style={{ flexGrow: 4 }}>
{iconButton ? (
<IAIIconButton
@ -64,18 +64,4 @@ export default function InvokeButton(props: InvokeButton) {
)}
</div>
);
return isReady ? (
buttonComponent
) : (
<IAIPopover trigger="hover" triggerComponent={buttonComponent}>
{reasonsWhyNotReady && (
<UnorderedList>
{reasonsWhyNotReady.map((reason, i) => (
<ListItem key={i}>{reason}</ListItem>
))}
</UnorderedList>
)}
</IAIPopover>
);
}