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