Remove the tooltip from around the button

environments/review-items-9u2qry/deployments/4365
Alex Gleason 2024-01-13 18:22:33 -06:00
rodzic 2530acece5
commit 1f65cc88b1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 9 dodań i 24 usunięć

Wyświetl plik

@ -119,32 +119,17 @@ const Item: React.FC<SoapboxItem> = ({ id, name, image, account, price }) => {
</HStack>
</div>
<MaybeTooltip text='You own this item' show={purchased}>
<Button
className={clsx('mt-auto', { 'animate-pulse': isPurchasing })}
disabled={isPurchasing || purchased}
theme='primary'
onClick={handlePurchase}
icon={getButtonIcon()}
>
{renderButtonText()}
</Button>
</MaybeTooltip>
<Button
className={clsx('mt-auto', { 'animate-pulse': isPurchasing })}
disabled={isPurchasing || purchased}
theme='primary'
onClick={handlePurchase}
icon={getButtonIcon()}
>
{renderButtonText()}
</Button>
</div>
);
};
interface IMaybeTooltip {
text?: string;
children: JSX.Element;
show?: boolean;
}
function MaybeTooltip({ text, children, show = true }: IMaybeTooltip) {
if (text && show) {
return <Tooltip text={text}>{children}</Tooltip>;
}
return <>{children}</>;
}
export default Items;