fix(goods): 简化兑换模态框的按钮样式逻辑

This commit is contained in:
JiaJun
2026-04-23 16:29:22 +08:00
parent f6f50ee6c7
commit 8002650b95

View File

@@ -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)}
>