From bc6a8ff959eb8c5e9c9239d66f683a27be856e2d Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Sun, 10 Sep 2023 07:58:48 -0700 Subject: [PATCH] chore: fix liquidity page and sidebars/header --- .../layouts/layout-with-sidebar.tsx | 4 +- .../liquidity-supplied/liquidity-supplied.tsx | 79 ++++++++++--------- apps/trading/components/sidebar/sidebar.tsx | 4 +- apps/trading/pages/client-router.tsx | 3 +- libs/ui-toolkit/src/components/link/link.tsx | 2 +- 5 files changed, 47 insertions(+), 45 deletions(-) diff --git a/apps/trading/components/layouts/layout-with-sidebar.tsx b/apps/trading/components/layouts/layout-with-sidebar.tsx index 0e777b993..520a53edd 100644 --- a/apps/trading/components/layouts/layout-with-sidebar.tsx +++ b/apps/trading/components/layouts/layout-with-sidebar.tsx @@ -23,8 +23,8 @@ export const LayoutWithSidebar = () => {
- } /> - } /> + } /> + } />
- - - {t('Supplied stake')} - - {market?.suppliedStake - ? addDecimalsFormatNumber( - new BigNumber(market?.suppliedStake).toString(), - assetDecimals - ) - : '-'} - - - - {t('Target stake')} - - {market?.targetStake - ? addDecimalsFormatNumber( - new BigNumber(market?.targetStake).toString(), - assetDecimals - ) - : '-'} - - - -
-
- - {t('View liquidity provision table')} - - {DocsLinks && ( - - {t('Learn about providing liquidity')} - - )} +
+ + + {t('Supplied stake')} + + {market?.suppliedStake + ? addDecimalsFormatNumber( + new BigNumber(market?.suppliedStake).toString(), + assetDecimals + ) + : '-'} + + + + {t('Target stake')} + + {market?.targetStake + ? addDecimalsFormatNumber( + new BigNumber(market?.targetStake).toString(), + assetDecimals + ) + : '-'} + + +
{showMessage && ( -

+

{t( 'The market has sufficient liquidity but there are not enough priced limit orders in the order book, which are required to deploy liquidity commitment pegged orders.' )}

)} +
+ + {t('View liquidity provision table')} + +
+ {DocsLinks && ( +
+ + {t('Learn about providing liquidity')} + +
+ )} ) : ( '-' diff --git a/apps/trading/components/sidebar/sidebar.tsx b/apps/trading/components/sidebar/sidebar.tsx index 6eb66a593..6f0eef819 100644 --- a/apps/trading/components/sidebar/sidebar.tsx +++ b/apps/trading/components/sidebar/sidebar.tsx @@ -81,7 +81,7 @@ export const Sidebar = () => { {/* buttons for specific routes */} @@ -91,7 +91,7 @@ export const Sidebar = () => { element={null} /> diff --git a/apps/trading/pages/client-router.tsx b/apps/trading/pages/client-router.tsx index 4d6aa2494..19d05b578 100644 --- a/apps/trading/pages/client-router.tsx +++ b/apps/trading/pages/client-router.tsx @@ -15,7 +15,8 @@ import { Deposit } from '../client-pages/deposit'; import { Withdraw } from '../client-pages/withdraw'; import { Transfer } from '../client-pages/transfer'; -// These must remain dynamically imported as pennant cannot be compiled by nextjs +// These must remain dynamically imported as pennant cannot be compiled by nextjs due to ESM +// Using dynamic imports is a workaround for this until pennant is published as ESM const MarketPage = lazy(() => import('../client-pages/market')); const Portfolio = lazy(() => import('../client-pages/portfolio')); diff --git a/libs/ui-toolkit/src/components/link/link.tsx b/libs/ui-toolkit/src/components/link/link.tsx index 524ba3fd6..172907214 100644 --- a/libs/ui-toolkit/src/components/link/link.tsx +++ b/libs/ui-toolkit/src/components/link/link.tsx @@ -11,7 +11,7 @@ type LinkProps = AnchorHTMLAttributes & { */ export const Link = ({ className, children, ...props }: LinkProps) => { const anchorClassName = classNames(className, { - underline: typeof children === 'string', + 'underline underline-offset-4': typeof children === 'string', 'cursor-pointer': props['aria-disabled'] !== true, 'opacity-50 pointer-events-none': props['aria-disabled'] === true, });