deploy
This commit is contained in:
@@ -38,7 +38,7 @@ export function ToggleCartIcon(props: {
|
|||||||
onSuccess: () => void qc.invalidateQueries({ queryKey: ['me', 'cart'] }),
|
onSuccess: () => void qc.invalidateQueries({ queryKey: ['me', 'cart'] }),
|
||||||
})
|
})
|
||||||
|
|
||||||
const disabled = !user || Boolean(disabledReason)
|
const disabled = Boolean(disabledReason)
|
||||||
const busy = addMut.isPending || removeMut.isPending
|
const busy = addMut.isPending || removeMut.isPending
|
||||||
|
|
||||||
const onClick = (e: React.MouseEvent) => {
|
const onClick = (e: React.MouseEvent) => {
|
||||||
@@ -64,7 +64,7 @@ export function ToggleCartIcon(props: {
|
|||||||
return (
|
return (
|
||||||
<Tooltip title={tooltip}>
|
<Tooltip title={tooltip}>
|
||||||
<span>
|
<span>
|
||||||
<IconButton size={size} onClick={onClick} disabled={disabled || busy} aria-label={tooltip}>
|
<IconButton size={size} onClick={onClick} disabled={disabled || busy} aria-label={tooltip} type="button">
|
||||||
{user ? inCart ? <ShoppingCartRoundedIcon /> : <AddShoppingCartOutlinedIcon /> : <ShoppingCartOutlinedIcon />}
|
{user ? inCart ? <ShoppingCartRoundedIcon /> : <AddShoppingCartOutlinedIcon /> : <ShoppingCartOutlinedIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user