Skip to content

Commit

Permalink
feat: put up for sale wording in the save button for offchain listings (
Browse files Browse the repository at this point in the history
#3219)

* feat: put up for sale wording in the save button for offchain listings

* feat: pass isOffchain prop
  • Loading branch information
juanmahidalgo authored Nov 6, 2024
1 parent 4d06a33 commit 34db425
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class EditPriceAndBeneficiaryModal extends React.PureComponent<Pr
}

render() {
const { name, error, isLoading, mountNode, item, withExpirationDate, onClose, onSkip } = this.props
const { name, error, isLoading, mountNode, item, withExpirationDate, isOffchain, onClose, onSkip } = this.props
const { isFree, isOwnerBeneficiary, price = '', expirationDate } = this.state
const beneficiary = this.getBeneficiary()

Expand Down Expand Up @@ -245,7 +245,7 @@ export default class EditPriceAndBeneficiaryModal extends React.PureComponent<Pr
</Button>
)}
<NetworkButton primary disabled={this.isDisabled()} loading={isLoading} network={Network.MATIC}>
{t('global.save')}
{t(isOffchain ? 'collection_detail_page.put_for_sale' : 'global.save')}
</NetworkButton>
</ModalActions>
</Form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type Props = ModalProps & {
itemSortedContents?: Record<string, Blob>
mountNode?: HTMLDivElement | undefined
withExpirationDate?: boolean
isOffchain?: boolean
onSave: typeof saveItemRequest | ((item: Item) => void)
onSetPriceAndBeneficiary:
| typeof setPriceAndBeneficiaryRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default function PutForSaleOffchainModal({
onClose={onClose}
onSave={() => undefined}
withExpirationDate
isOffchain
/>
)
}

0 comments on commit 34db425

Please sign in to comment.