Disable select button when gift isn't available.

This commit is contained in:
oshawott 2022-03-21 02:20:37 +11:00
parent c8fe1934f1
commit f783639a14

View File

@ -49,7 +49,7 @@ export const VipGiftItem : FC<VipGiftItemViewProps> = props =>
<LayoutGridItem center={ false } column={ false } alignItems="center" className="p-1">
<LayoutImage imageUrl={ getImageUrlForOffer() } fit={ false } style={ { width: 50, height: 50 } } />
<Text grow fontWeight="bold">{ getItemTitle() }</Text>
<Button variant="secondary" onClick={ () => onSelect(offer.localizationId) }>
<Button variant="secondary" onClick={ () => onSelect(offer.localizationId) } disabled={ !isAvailable }>
{ LocalizeText('catalog.club_gift.select') }
</Button>
</LayoutGridItem>