Skip to content

Commit

Permalink
refactor: cleanup AssetActionsMenu (#7244)
Browse files Browse the repository at this point in the history
* chore: cleanup `AssetActionsMenu`

* fix: update modal type

---------

Co-authored-by: Begoña Alvarez <[email protected]>
  • Loading branch information
VmMad and begonaalvarezd authored Aug 1, 2023
1 parent 885b12e commit 90872b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
KeyValueBox,
FontWeight,
TextType,
AssetActionsMenu,
AssetActionsModal,
MeatballMenuButton,
Modal,
} from 'shared/components'
Expand Down Expand Up @@ -89,7 +89,7 @@
{#if asset.standard === TokenStandard.Irc30}
<div class="max-h-7 max-w-9 overflow-visible relative">
<MeatballMenuButton onClick={modal?.toggle} />
<AssetActionsMenu bind:modal {asset} position={{ right: '0' }} classes="mt-1.5" />
<AssetActionsModal bind:modal {asset} position={{ right: '0' }} classes="mt-1.5" />
</div>
{/if}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
import { MenuItem, Modal } from 'shared/components'
import features from '@features/features'
export let modal: Modal = undefined
export let modal: Modal | undefined
export let asset: IAsset
function handleUnverify(): void {
unverifyAsset(asset.id, NotVerifiedStatus.Skipped)
updatePopupProps({
asset: { ...asset, verification: { verified: false, status: NotVerifiedStatus.Skipped } },
})
modal.close()
modal?.close()
}
function handleVerify(): void {
verifyAsset(asset.id, VerifiedStatus.SelfVerified)
updatePopupProps({
asset: { ...asset, verification: { verified: true, status: VerifiedStatus.SelfVerified } },
})
modal.close()
modal?.close()
}
function handleUnhide(): void {
Expand All @@ -40,7 +40,7 @@
updatePopupProps({
asset: { ...asset, hidden: false },
})
modal.close()
modal?.close()
}
function handleHide(): void {
Expand All @@ -49,11 +49,11 @@
updatePopupProps({
asset: { ...asset, hidden: true },
})
modal.close()
modal?.close()
}
function handleBurnToken(): void {
modal.close()
modal?.close()
openPopup({ id: PopupId.BurnNativeTokens, props: { asset } })
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/components/modals/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { default as AssetActionsMenu } from './AssetActionsMenu.svelte'
export { default as AssetActionsModal } from './AssetActionsModal.svelte'
export { default as CollectibleDetailsMenu } from './CollectibleDetailsMenu.svelte'
export { default as ExpirationTimePickerMenu } from './ExpirationTimePickerMenu.svelte'
export { default as Modal } from './Modal.svelte'
Expand Down

0 comments on commit 90872b6

Please sign in to comment.