-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add Mint name with crypto modal (#2140)
* fix: Refactor buy with crypto modal * fix: Complete refactor * fix: Loading correct modal * fix: Use refactored modals * fix: Tests * fix: Casing * fix: Removed old casing * fix: Re-case * fix: Remove old cased directory * fix: Re-case * fix: Little improvements * feat: Add MintNameWithCryptoModal * feat: Use the new modal * fix: Test type * feat: Add some hook tests * fix: Remove selectedToken unnecessary checks * fix: Add use name minting gas tests * fix: Refech route on change token * feat: On go back * fix: Remove buying price from hooks * fix: Review fixes --------- Co-authored-by: Nando <24811313+fzavalia@users.noreply.github.com>
- Loading branch information
1 parent
558dd01
commit 2e18a55
Showing
43 changed files
with
1,260 additions
and
880 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...ents/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.buy_with_card:global(.ui.button) { | ||
background-color: var(--superGray); | ||
} | ||
|
||
.buy_with_card:global(.ui.button):hover { | ||
background-color: var(--superGrayHovered); | ||
} |
20 changes: 20 additions & 0 deletions
20
.../components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Icon, Button } from 'decentraland-ui' | ||
import classNames from 'classnames' | ||
import { t } from 'decentraland-dapps/dist/modules/translation' | ||
import styles from './BuyWithCardButton.module.css' | ||
import { Props } from './BuyWithCardButton.types' | ||
|
||
export const BuyWithCardButton = (props: Props) => { | ||
const { className, ...otherProps } = props | ||
|
||
return ( | ||
<Button | ||
className={classNames(styles.buy_with_card, className)} | ||
fluid | ||
{...otherProps} | ||
> | ||
<Icon name="credit card outline" /> | ||
{t('asset_page.actions.buy_with_card')} | ||
</Button> | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
...onents/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { ButtonProps } from "decentraland-ui/dist/components/Button/Button" | ||
|
||
export type Props = ButtonProps |
2 changes: 2 additions & 0 deletions
2
webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './BuyWithCardButton' | ||
export * from './BuyWithCardButton.types' |
13 changes: 13 additions & 0 deletions
13
...ponents/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/BuyWithCryptoButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { t } from 'decentraland-dapps/dist/modules/translation' | ||
import { Button, Mana } from 'decentraland-ui' | ||
import { Props } from './BuyWithCryptoButton.types' | ||
|
||
export const BuyWithCryptoButton = (props: Props) => { | ||
const { assetNetwork, ...otherProps } = props | ||
return ( | ||
<Button primary fluid {...otherProps}> | ||
<Mana showTooltip inline size="small" network={assetNetwork} /> | ||
{t('asset_page.actions.buy_with_crypto')} | ||
</Button> | ||
) | ||
} |
6 changes: 6 additions & 0 deletions
6
...ts/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/BuyWithCryptoButton.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { Network } from "@dcl/schemas" | ||
import type { ButtonProps } from "decentraland-ui/dist/components/Button/Button" | ||
|
||
export type Props = ButtonProps & { | ||
assetNetwork: Network | ||
} |
2 changes: 2 additions & 0 deletions
2
webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './BuyWithCryptoButton' | ||
export * from './BuyWithCryptoButton.types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.