import React from "react"; import { Link } from "react-router-dom"; import { useApolloClient } from "@apollo/react-hooks"; import { Menu, Icon } from "antd"; import "./header.styles.scss"; import SignOut from "../sign-out/sign-out.component"; import ManageSignInButton from "../manage-sign-in-button/manage-sign-in-button.component"; import GlobalSearch from "../global-search/global-search.component"; import LanguageSelector from "../language-selector/langauge-selector.component"; export default ({ landingHeader, navItems, selectedNavItem }) => { const apolloClient = useApolloClient(); const handleClick = e => { apolloClient.writeData({ data: { selectedNavItem: e.key } }); }; return ( {navItems.map(navItem => ( {navItem.icontype ? : null} {navItem.title} ))} {!landingHeader ? ( ) : ( )} {!landingHeader ? : null} ); };