From e12b24ee2ef5be854adacc7a821d23a2388c18ce Mon Sep 17 00:00:00 2001 From: saml33 Date: Mon, 18 Mar 2024 10:06:33 +1100 Subject: [PATCH] use title instead of tooltip --- components/SideNav.tsx | 119 +++++++----------- components/TopBar.tsx | 3 +- .../notifications/NotificationsButton.tsx | 3 + 3 files changed, 52 insertions(+), 73 deletions(-) diff --git a/components/SideNav.tsx b/components/SideNav.tsx index 058bd742..fcb5631b 100644 --- a/components/SideNav.tsx +++ b/components/SideNav.tsx @@ -34,7 +34,6 @@ import React, { } from 'react' import { Disclosure, Popover, Transition } from '@headlessui/react' import MangoAccountSummary from './account/MangoAccountSummary' -import Tooltip from './shared/Tooltip' import { HealthType } from '@blockworks-foundation/mango-v4' import { useWallet } from '@solana/wallet-adapter-react' import mangoStore from '@store/mangoStore' @@ -232,7 +231,6 @@ const SideNav = ({ collapsed }: { collapsed: boolean }) => { title={t('overview')} pagePath="/?view=overview" hideIconBg - showTooltip={false} /> { title={t('balances')} pagePath="/?view=balances" hideIconBg - showTooltip={false} /> { title={t('trade:positions')} pagePath="/?view=positions" hideIconBg - showTooltip={false} /> { title={t('trade:orders')} pagePath="/?view=orders" hideIconBg - showTooltip={false} /> { title={t('trade:unsettled')} pagePath="/?view=unsettled" hideIconBg - showTooltip={false} /> { title={t('history')} pagePath="/?view=history" hideIconBg - showTooltip={false} /> { title={t('perp')} pagePath="/trade?name=SOL-PERP" hideIconBg - showTooltip={false} /> { title={t('spot')} pagePath="/trade?name=SOL/USDC" hideIconBg - showTooltip={false} /> { title={t('search:search-accounts')} pagePath="/search" hideIconBg - showTooltip={false} /> { title={t('common:list-market-token')} pagePath="/governance/list" hideIconBg - showTooltip={false} /> { title={t('common:vote')} pagePath="/governance/vote" hideIconBg - showTooltip={false} /> { pagePath="https://docs.mango.markets" hideIconBg isExternal - showTooltip={false} /> { pagePath="https://dao.mango.markets" hideIconBg isExternal - showTooltip={false} /> {/* { pagePath="https://forms.gle/JgV4w7SJ2kPH89mq7" hideIconBg isExternal - showTooltip={false} /> */} { pagePath="https://docs.mango.markets/legal" hideIconBg isExternal - showTooltip={false} /> { pagePath="https://docs.mango.markets/mango-markets/risks" hideIconBg isExternal - showTooltip={false} /> @@ -503,7 +486,6 @@ const MenuItem = ({ pagePath, hideIconBg, isExternal, - showTooltip = true, }: { active?: boolean collapsed: boolean @@ -513,67 +495,59 @@ const MenuItem = ({ pagePath: string hideIconBg?: boolean isExternal?: boolean - showTooltip?: boolean }) => { const { theme } = useTheme() - const { width } = useViewport() - const hideTooltip = width >= breakpoints.lg return ( - - -
-
- {icon ? ( -
- {icon} -
- ) : null} - +
+ {icon ? ( +
- - {title} - - -
- {isExternal ? ( - + {icon} +
) : null} + + + {title} + +
- - + {isExternal ? ( + + ) : null} +
+ ) } @@ -670,6 +644,7 @@ export const ExpandableMenuItem = ({ onKeyDown={() => { setIsOpen(!isOpen) }} + title={`${title}`} >
{ @@ -301,6 +301,7 @@ const TopBar = () => {