From 32578711b28896acf117eeed11530417915159eb Mon Sep 17 00:00:00 2001 From: tjs Date: Fri, 30 Sep 2022 00:21:23 -0400 Subject: [PATCH] general refinements --- components/Layout.tsx | 4 +-- components/MangoAccountsList.tsx | 4 +-- components/OnboardingTour.tsx | 2 +- components/SideNav.tsx | 32 ++++++++--------------- components/mobile/BottomBar.tsx | 24 ++++++++++------- components/shared/IconDropMenu.tsx | 6 ++--- components/shared/Modal.tsx | 4 +-- components/shared/Notification.tsx | 8 ++++-- components/shared/TabButtons.tsx | 13 +++++++-- components/shared/Transitions.tsx | 4 +-- components/swap/SwapForm.tsx | 2 +- components/swap/SwapFormTokenList.tsx | 27 ++++++++++--------- components/swap/SwapSettings.tsx | 2 +- components/trade/AdvancedMarketHeader.tsx | 4 +-- components/trade/RecentTrades.tsx | 2 +- components/trade/TradingViewChart.tsx | 1 + styles/colors.ts | 2 +- styles/globals.css | 3 +-- tailwind.config.js | 2 +- utils/constants.ts | 2 +- 20 files changed, 79 insertions(+), 69 deletions(-) diff --git a/components/Layout.tsx b/components/Layout.tsx index cef9d66d..21653440 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -35,7 +35,7 @@ const Layout = ({ children }: { children: ReactNode }) => { }, [width]) useEffect(() => { - const animationFrames = 5 + const animationFrames = 15 for (let x = 1; x <= animationFrames; x++) { setTimeout(() => { @@ -55,7 +55,7 @@ const Layout = ({ children }: { children: ReactNode }) => { ) : null} -
+
diff --git a/components/MangoAccountsList.tsx b/components/MangoAccountsList.tsx index de3b7b09..f7faee25 100644 --- a/components/MangoAccountsList.tsx +++ b/components/MangoAccountsList.tsx @@ -76,7 +76,7 @@ const MangoAccountsList = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > - + {loading ? ( ) : mangoAccounts.length ? ( @@ -84,7 +84,7 @@ const MangoAccountsList = ({

{title}

{description}

diff --git a/components/SideNav.tsx b/components/SideNav.tsx index 8f5e5ac5..b6ebc118 100644 --- a/components/SideNav.tsx +++ b/components/SideNav.tsx @@ -42,7 +42,7 @@ const SideNav = ({ collapsed }: { collapsed: boolean }) => { return (
@@ -50,7 +50,7 @@ const SideNav = ({ collapsed }: { collapsed: boolean }) => {
@@ -323,26 +323,16 @@ export const ExpandableMenuItem = ({ {icon}
- - - {children} - - + {children} +
) : ( diff --git a/components/mobile/BottomBar.tsx b/components/mobile/BottomBar.tsx index 930dc182..69fcb964 100644 --- a/components/mobile/BottomBar.tsx +++ b/components/mobile/BottomBar.tsx @@ -12,6 +12,7 @@ import { ChevronRightIcon, CurrencyDollarIcon as FeesIcon, LightBulbIcon, + ArrowsRightLeftIcon, } from '@heroicons/react/20/solid' const StyledBarItemLabel = ({ @@ -58,18 +59,18 @@ const BottomBar = () => { asPath === '/swap' ? 'text-th-primary' : 'text-th-fgd-3' } col-span-1 flex cursor-pointer flex-col items-center`} > - - {t('trade')} + + {t('swap')} - + - - {t('stats')} + + {t('trade')}
setShowPanel(false)} hideBg> - +
setShowPanel(false)} > + } + /> { const classNames = - 'default-transition flex w-full items-center justify-between border-t border-th-bkg-4 px-2 py-3 text-th-fgd-2 hover:text-th-fgd-1' + 'default-transition flex w-full items-center justify-between border-t border-th-bkg-4 px-2 py-4 text-th-fgd-2 hover:text-th-fgd-1' return isExternal ? ( - {open ? : icon} + {open ? : icon}
@@ -39,7 +39,7 @@ function Modal({ onClick={onClose} className={`absolute right-4 top-4 z-50 text-th-fgd-4 focus:outline-none md:right-2 md:top-2 md:hover:text-th-primary`} > - + ) : null} {title} diff --git a/components/shared/Notification.tsx b/components/shared/Notification.tsx index 2b23a1f5..e5833f4c 100644 --- a/components/shared/Notification.tsx +++ b/components/shared/Notification.tsx @@ -106,8 +106,10 @@ const Notification = ({ notification }: { notification: Notification }) => { hideNotification() } }, - parsedTitle || type === 'confirm' || type === 'error' + parsedTitle || type === 'confirm' ? CLIENT_TX_TIMEOUT + : type === 'error' + ? 30000 : 8000 ) @@ -151,7 +153,9 @@ const Notification = ({ notification }: { notification: Notification }) => { {parsedTitle || title}

{description ? ( -

+

{description}

) : null} diff --git a/components/shared/TabButtons.tsx b/components/shared/TabButtons.tsx index 53fbd0e1..8269995c 100644 --- a/components/shared/TabButtons.tsx +++ b/components/shared/TabButtons.tsx @@ -29,7 +29,7 @@ const TabButtons: FunctionComponent = ({ {values.map(([label, count], i) => (
))} diff --git a/components/shared/Transitions.tsx b/components/shared/Transitions.tsx index ffb3428c..5fc1940a 100644 --- a/components/shared/Transitions.tsx +++ b/components/shared/Transitions.tsx @@ -1,8 +1,8 @@ import { Transition } from '@headlessui/react' import { CSSProperties, ReactNode } from 'react' -const transitionEnterStyle = 'transition-all ease-in duration-300' -const transitionExitStyle = 'transition-all ease-out duration-300' +const transitionEnterStyle = 'transition-all ease-out duration-500' +const transitionExitStyle = 'transition-all ease-in duration-300' export const EnterRightExitLeft = ({ children, diff --git a/components/swap/SwapForm.tsx b/components/swap/SwapForm.tsx index 70607aff..b5ac8975 100644 --- a/components/swap/SwapForm.tsx +++ b/components/swap/SwapForm.tsx @@ -287,7 +287,7 @@ const SwapForm = () => { /> ) : null}
-
+