Skip to content

Commit

Permalink
fix: Show list for rent button after expired rental listing (decentra…
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio authored Mar 17, 2023
1 parent bdefd7c commit ec4dba9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions webapp/src/components/ManageAssetPage/Rent/Rent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const Rent = (props: Props) => {
wallet && rental && canBeClaimed(wallet.address, rental, nft)

const rentButton = useMemo(() => {
if (!rental) {
if (!rental || (isRentalListingCancelled(rental) && !canBeClaimedBack)) {
return (
<Button
className={styles.actionButtonRounded}
Expand All @@ -93,11 +93,10 @@ export const Rent = (props: Props) => {
{t('manage_asset_page.rent.list_for_rent')}
</Button>
)
}
if (rental && isRentalListingOpen(rental)) {
} else if (rental && isRentalListingOpen(rental)) {
return <IconButton iconName="pencil" onClick={handleOnCreateOrEdit} />
}
}, [handleOnCreateOrEdit, rental])
}, [handleOnCreateOrEdit, rental, canBeClaimedBack])

return (
<section className={classNames(styles.box, className)}>
Expand Down

0 comments on commit ec4dba9

Please sign in to comment.