Skip to content

Commit

Permalink
fix: hide history icon when HiddenUI.History is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Apr 25, 2023
1 parent 6fa9d67 commit 748c6cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/widget/src/components/Header/NavigationHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
import { Route, Routes, useLocation } from 'react-router-dom';
import { useNavigateBack } from '../../hooks';
import { useWallet, useWidgetConfig } from '../../providers';
import { HiddenUI } from '../../types';
import {
backButtonRoutes,
navigationRoutes,
Expand All @@ -16,7 +17,7 @@ import { useHeaderActionStore } from './useHeaderActionStore';

export const NavigationHeader: React.FC = () => {
const { t } = useTranslation();
const { variant } = useWidgetConfig();
const { variant, hiddenUI } = useWidgetConfig();
const { navigate, navigateBack } = useNavigateBack();
const { account } = useWallet();
const { element } = useHeaderActionStore();
Expand Down Expand Up @@ -102,7 +103,7 @@ export const NavigationHeader: React.FC = () => {
path={navigationRoutes.home}
element={
<>
{account.isActive ? (
{account.isActive && !hiddenUI?.includes(HiddenUI.History) ? (
<Tooltip title={t(`header.swapHistory`)} enterDelay={400} arrow>
<IconButton
size="medium"
Expand Down

0 comments on commit 748c6cd

Please sign in to comment.