Skip to content

Commit

Permalink
fix: Close sell collection modal when setting the store as minter (#3232
Browse files Browse the repository at this point in the history
)
  • Loading branch information
LautaroPetaccio authored Jan 2, 2025
1 parent 888dba9 commit 6ab0cc6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.EditPriceAndBeneficiaryModal.ui.modal .modalContainer {
display: grid;
grid-template-columns: 200px 1fr;
margin-top: 30px;
gap: 40px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const PublishWizardCollectionModal: React.FC<Props & WithAuthorizedAction
onCloseAuthorization
} = props
const [currentStep, setCurrentStep] = useState<number>(PublishWizardCollectionSteps.CONFIRM_COLLECTION_NAME)
console.log('currentStep: ', currentStep)
const [emailAddress, setEmailAddress] = useState<string>('')
const [cheque, setCheque] = useState<Cheque | undefined>(undefined)
const [isSigningCheque, setIsSigningCheque] = useState<boolean>(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default class SellCollectionModal extends React.PureComponent<Props> {
const { metadata, isLoading, hasUnsyncedItems, isOffchainPublicItemOrdersEnabled, onClose } = this.props
const tKey = metadata.isOnSale ? 'remove_from_marketplace' : isOffchainPublicItemOrdersEnabled ? 'enable_sales' : 'put_for_sale'
return (
<Modal className="SellCollectionModal" size="tiny" onClose={onClose}>
<ModalNavigation title={t(`sell_collection_modal.${tKey}.title`)} onClose={onClose} />
<Modal className="SellCollectionModal" size="tiny" onClose={isLoading ? undefined : onClose}>
<ModalNavigation title={t(`sell_collection_modal.${tKey}.title`)} onClose={isLoading ? undefined : onClose} />
<Modal.Content>
{hasUnsyncedItems && <p className="unsynced-warning danger-text">{t('sell_collection_modal.unsynced_warning')}</p>}
{t(`sell_collection_modal.${tKey}.description`)}
Expand Down
9 changes: 8 additions & 1 deletion src/modules/modal/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ import { closeAllModals } from 'decentraland-dapps/dist/modules/modal/actions'
import { RESET_ITEM_SUCCESS, SET_PRICE_AND_BENEFICIARY_SUCCESS } from 'modules/item/actions'
import { PUSH_COLLECTION_CURATION_SUCCESS } from 'modules/curations/collectionCuration/actions'
import { EXPORT_PROJECT_SUCCESS } from 'modules/project/actions'
import { SET_COLLECTION_MINTERS_SUCCESS } from 'modules/collection/actions'

export function* modalSaga() {
yield takeEvery(LOCATION_CHANGE, handleLocationChange)
yield takeEvery(
[PUSH_COLLECTION_CURATION_SUCCESS, RESET_ITEM_SUCCESS, SET_PRICE_AND_BENEFICIARY_SUCCESS, EXPORT_PROJECT_SUCCESS],
[
PUSH_COLLECTION_CURATION_SUCCESS,
RESET_ITEM_SUCCESS,
SET_PRICE_AND_BENEFICIARY_SUCCESS,
EXPORT_PROJECT_SUCCESS,
SET_COLLECTION_MINTERS_SUCCESS
],
handleCloseAllModals
)
}
Expand Down

0 comments on commit 6ab0cc6

Please sign in to comment.