From 4f97064e469f01462cf3c93efd7cb482149f447e Mon Sep 17 00:00:00 2001 From: saml33 Date: Sun, 29 Jan 2023 21:05:32 +1100 Subject: [PATCH] fix console warning --- components/account/AccountActions.tsx | 92 ++++++++++++--------------- 1 file changed, 42 insertions(+), 50 deletions(-) diff --git a/components/account/AccountActions.tsx b/components/account/AccountActions.tsx index 980bc13b..4c2a5562 100644 --- a/components/account/AccountActions.tsx +++ b/components/account/AccountActions.tsx @@ -21,7 +21,7 @@ import useMangoAccount from 'hooks/useMangoAccount' import BorrowRepayModal from '@components/modals/BorrowRepayModal' import { useWallet } from '@solana/wallet-adapter-react' import CreateAccountModal from '@components/modals/CreateAccountModal' -import { Menu, Transition } from '@headlessui/react' +import { Popover, Transition } from '@headlessui/react' import ActionsLinkButton from './ActionsLinkButton' export const handleCopyAddress = ( @@ -75,10 +75,10 @@ const AccountActions = () => { {t('borrow')} - + {({ open }) => (
- @@ -89,7 +89,7 @@ const AccountActions = () => { {t('actions')} - + { leaveFrom="opacity-100" leaveTo="opacity-0" > - - - - handleCopyAddress( - mangoAccount!, - t('copy-address-success', { - pk: abbreviateAddress(mangoAccount!.publicKey), - }) - ) - } - > - - {t('copy-address')} - - - - setShowEditAccountModal(true)} - > - - {t('edit-account')} - - - - setShowDelegateModal(true)} - > - - {t('delegate-account')} - - - - setShowCloseAccountModal(true)} - > - - {t('close-account')} - - - + + + handleCopyAddress( + mangoAccount!, + t('copy-address-success', { + pk: abbreviateAddress(mangoAccount!.publicKey), + }) + ) + } + > + + {t('copy-address')} + + setShowEditAccountModal(true)} + > + + {t('edit-account')} + + setShowDelegateModal(true)} + > + + {t('delegate-account')} + + setShowCloseAccountModal(true)} + > + + {t('close-account')} + +
)} -
+ )} {showCloseAccountModal ? (