Skip to content

Commit

Permalink
fix: apply HiddenUI to wallet connect in default variant
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Nov 28, 2023
1 parent 9bdc89e commit da20754
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/widget/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -21,10 +22,14 @@ export const HeaderContainer: FC<PropsWithChildren<{}>> = ({ children }) => {
};

export const Header: FC = () => {
const { walletManagement, subvariant } = useWidgetConfig();
const { walletManagement, subvariant, hiddenUI } = useWidgetConfig();
return (
<HeaderContainer>
{!walletManagement && subvariant !== 'split' ? <WalletHeader /> : null}
{!walletManagement &&
subvariant !== 'split' &&
!hiddenUI?.includes(HiddenUI.WalletMenu) ? (
<WalletHeader />
) : null}
<NavigationHeader />
</HeaderContainer>
);
Expand Down

0 comments on commit da20754

Please sign in to comment.