chore: back merge release/testnet (#2248)
* fix: orderbook decimal places issue (#2235) * fix: positions table fixes notional dp (#2144) * fix: update decimals on position notional size * fix: normalize values * fix: fix positions unit tests * fix: remove liquidation price * fix: positions linting issue * fix: remove liquidation price test * fix: remove total summary row * fix: remove comments * fix: cypress test to not show trailing 0s * fix: add back liq. price est as cell only * fix: remove not used params * chore: merge with release/testnet * fix: orderbook dp * Update libs/positions/src/lib/positions-table.spec.tsx * fix: governance navbar link (#2247) * fix: governance navbar link * fix(#2245): fix gov link a tag no navlink * fix(#2245): remove export getActiveNavLinkClassNames Co-authored-by: m.ray <16125548+MadalinaRaicu@users.noreply.github.com>
This commit is contained in:
parent
02f56dd0ec
commit
c2d2985e92
@ -67,13 +67,14 @@ export const Navbar = ({
|
|||||||
path={Routes.PORTFOLIO}
|
path={Routes.PORTFOLIO}
|
||||||
navbarTheme={navbarTheme}
|
navbarTheme={navbarTheme}
|
||||||
/>
|
/>
|
||||||
<AppNavLink
|
<a
|
||||||
name={t('Governance')}
|
href={`${VEGA_TOKEN_URL}/governance`}
|
||||||
path={`${VEGA_TOKEN_URL}/governance`}
|
|
||||||
alignRight={true}
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
navbarTheme={navbarTheme}
|
rel="noreferrer"
|
||||||
/>
|
className={getActiveNavLinkClassNames(false, navbarTheme, true)}
|
||||||
|
>
|
||||||
|
{t('Governance')}
|
||||||
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
<div className="flex items-center gap-2 ml-auto">
|
<div className="flex items-center gap-2 ml-auto">
|
||||||
<VegaWalletConnectButton />
|
<VegaWalletConnectButton />
|
||||||
@ -108,19 +109,8 @@ const AppNavLink = ({
|
|||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
data-testid={testId}
|
data-testid={testId}
|
||||||
to={path}
|
to={{ pathname: path }}
|
||||||
className={({ isActive }) => {
|
className={getNavLinkClassNames(navbarTheme, alignRight)}
|
||||||
return classNames('mx-2 py-3 self-end relative', {
|
|
||||||
'cursor-default': isActive,
|
|
||||||
'text-black dark:text-white': isActive && navbarTheme !== 'yellow',
|
|
||||||
'text-neutral-500 dark:text-neutral-400 hover:text-black dark:hover:text-neutral-300':
|
|
||||||
!isActive && navbarTheme !== 'yellow',
|
|
||||||
'ml-auto': alignRight,
|
|
||||||
'text-black': isActive && navbarTheme === 'yellow',
|
|
||||||
'text-black/60 hover:text-black':
|
|
||||||
!isActive && navbarTheme === 'yellow',
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
target={target}
|
target={target}
|
||||||
>
|
>
|
||||||
{({ isActive }) => {
|
{({ isActive }) => {
|
||||||
@ -134,3 +124,28 @@ const AppNavLink = ({
|
|||||||
</NavLink>
|
</NavLink>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getNavLinkClassNames(
|
||||||
|
navbarTheme: string,
|
||||||
|
alignRight = false
|
||||||
|
): (props: { isActive?: boolean }) => string | undefined {
|
||||||
|
return ({ isActive = false }) => {
|
||||||
|
return getActiveNavLinkClassNames(isActive, navbarTheme, alignRight);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const getActiveNavLinkClassNames = (
|
||||||
|
isActive: boolean,
|
||||||
|
navbarTheme: string,
|
||||||
|
alignRight = false
|
||||||
|
): string | undefined => {
|
||||||
|
return classNames('mx-2 py-3 self-end relative', {
|
||||||
|
'cursor-default': isActive,
|
||||||
|
'text-black dark:text-white': isActive && navbarTheme !== 'yellow',
|
||||||
|
'text-neutral-500 dark:text-neutral-400 hover:text-black dark:hover:text-neutral-300':
|
||||||
|
!isActive && navbarTheme !== 'yellow',
|
||||||
|
'ml-auto': alignRight,
|
||||||
|
'text-black': isActive && navbarTheme === 'yellow',
|
||||||
|
'text-black/60 hover:text-black': !isActive && navbarTheme === 'yellow',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user