From fe21fa812dcf7a478ca6b98bc9503a54dfc8d297 Mon Sep 17 00:00:00 2001 From: Anastasios Date: Mon, 19 Aug 2024 21:56:15 +0400 Subject: [PATCH] fix: validate dom nesting console error --- .../pages/home/components/account-actions.tsx | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/app/pages/home/components/account-actions.tsx b/src/app/pages/home/components/account-actions.tsx index 790c8c6827b..8a1a96b824f 100644 --- a/src/app/pages/home/components/account-actions.tsx +++ b/src/app/pages/home/components/account-actions.tsx @@ -2,7 +2,7 @@ import { useLocation, useNavigate } from 'react-router-dom'; import { ChainID } from '@stacks/transactions'; import { HomePageSelectors } from '@tests/selectors/home.selectors'; -import { Flex } from 'leather-styles/jsx'; +import { Box, Flex } from 'leather-styles/jsx'; import { whenStacksChainId } from '@leather.io/stacks'; import { CreditCardIcon, IconButton, InboxIcon, SwapIcon } from '@leather.io/ui'; @@ -56,14 +56,22 @@ export function AccountActions() { )} {whenStacksChainId(currentNetwork.chain.stacks.chainId)({ [ChainID.Mainnet]: ( - } side="left"> - } - label="Swap" - onClick={() => navigate(RouteUrls.Swap.replace(':base', 'STX').replace(':quote', ''))} - /> + } + side="left" + asChild + > + + } + label="Swap" + onClick={() => + navigate(RouteUrls.Swap.replace(':base', 'STX').replace(':quote', '')) + } + /> + ), [ChainID.Testnet]: null,