Skip to content

Commit

Permalink
Merge pull request #384 from kubeshop/mm/fix/consolewarning
Browse files Browse the repository at this point in the history
fix: add keys to submenu
  • Loading branch information
mortada-codes authored Apr 29, 2022
2 parents bfd7fb1 + af59040 commit 4d134b5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions web/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import {Menu} from 'antd';
import {Link, useLocation} from 'react-router-dom';
import {QuestionCircleOutlined} from '@ant-design/icons';
import {DOCUMENTATION_URL, GITHUB_URL} from 'lib/Constants';
import useGuidedTour from 'hooks/useGuidedTour';
import {GuidedTours} from 'services/GuidedTourService';
import { useTour } from '@reactour/tour';
import HomeAnalyticsService from 'services/analytics/HomeAnalyticsService';
import Logo from 'assets/Logo.svg';
import * as S from './Header.styled';
Expand All @@ -13,10 +12,9 @@ const {onGuidedTourClick} = HomeAnalyticsService;

const Header: FC = () => {
const {pathname} = useLocation();
const {setCurrentStep, setIsOpen} = useGuidedTour(GuidedTours.Home);
const {setIsOpen} = useTour();

const handleGuidedTourCLick = () => {
setCurrentStep(0);
setIsOpen(true);
onGuidedTourClick();
};
Expand All @@ -39,8 +37,8 @@ const Header: FC = () => {
Documentation
</a>
</S.NavMenuItem>
<Menu.SubMenu icon={<QuestionCircleOutlined style={{color: '#E5E5E5', fontSize: 16}} />}>
<S.NavMenuItem onClick={handleGuidedTourCLick}>Show Onboarding </S.NavMenuItem>
<Menu.SubMenu key="help" icon={<QuestionCircleOutlined style={{color: '#E5E5E5', fontSize: 16}} />}>
<S.NavMenuItem key="guidedTour" onClick={handleGuidedTourCLick}>Show Onboarding </S.NavMenuItem>
</Menu.SubMenu>
</S.NavMenu>
</S.Header>
Expand Down

0 comments on commit 4d134b5

Please sign in to comment.