From da207541bafc372ff8e5078f79985cf4caaf212e Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 28 Nov 2023 14:53:07 +0100 Subject: [PATCH] fix: apply HiddenUI to wallet connect in default variant --- packages/widget/src/components/Header/Header.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/widget/src/components/Header/Header.tsx b/packages/widget/src/components/Header/Header.tsx index 07eecc68c..c8091ac7c 100644 --- a/packages/widget/src/components/Header/Header.tsx +++ b/packages/widget/src/components/Header/Header.tsx @@ -2,6 +2,7 @@ import type { FC, PropsWithChildren } from 'react'; import { useLocation } from 'react-router-dom'; import { useDefaultElementId } from '../../hooks'; import { useWidgetConfig } from '../../providers'; +import { HiddenUI } from '../../types'; import { ElementId, createElementId, stickyHeaderRoutes } from '../../utils'; import { Container } from './Header.style'; import { NavigationHeader } from './NavigationHeader'; @@ -21,10 +22,14 @@ export const HeaderContainer: FC> = ({ children }) => { }; export const Header: FC = () => { - const { walletManagement, subvariant } = useWidgetConfig(); + const { walletManagement, subvariant, hiddenUI } = useWidgetConfig(); return ( - {!walletManagement && subvariant !== 'split' ? : null} + {!walletManagement && + subvariant !== 'split' && + !hiddenUI?.includes(HiddenUI.WalletMenu) ? ( + + ) : null} );