fix(goods): 简化兑换模态框的按钮样式逻辑
This commit is contained in:
@@ -106,7 +106,6 @@ export function GoodsRedeemModal({
|
||||
const isPhysicalPrize = selectedCategoryId === 'PHYSICAL'
|
||||
const isTransferToPlatform = selectedCategoryId === 'WITHDRAW'
|
||||
const isGameBonus = selectedCategoryId === 'BONUS'
|
||||
const isPhysicalPrizeSelection = modalMode === 'select-address' && isPhysicalPrize
|
||||
const modalTitle = modalMode === 'add-address'
|
||||
? t('goods.addShippingAddress')
|
||||
: isTransferToPlatform
|
||||
@@ -206,9 +205,7 @@ export function GoodsRedeemModal({
|
||||
<Button
|
||||
type="button"
|
||||
variant="gray"
|
||||
className={`h-[38px] text-[14px] ${
|
||||
isPhysicalPrizeSelection ? 'w-[124px]' : 'w-full sm:w-auto'
|
||||
}`}
|
||||
className="h-[38px] w-[124px] text-[14px]"
|
||||
onClick={modalMode === 'add-address' ? onBackToSelectAddress : onClose}
|
||||
disabled={submitLoading}
|
||||
>
|
||||
@@ -216,9 +213,7 @@ export function GoodsRedeemModal({
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
className={`h-[38px] ${
|
||||
isPhysicalPrizeSelection ? 'w-[124px]' : 'w-full sm:w-auto'
|
||||
} ${modalMode === 'add-address' && !isAddAddressFormValid ? 'opacity-50' : ''}`}
|
||||
className={`h-[38px] w-[124px] ${modalMode === 'add-address' && !isAddAddressFormValid ? 'opacity-50' : ''}`}
|
||||
onClick={onConfirm}
|
||||
disabled={submitLoading || (modalMode === 'add-address' && !isAddAddressFormValid)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user