import classNames from 'classnames'; import React, { useContext } from 'react'; import { NavLink, useLocation } from 'react-router-dom'; import { PluginHeader, SliderBanner } from 'ui'; import { Tab, TabContext } from 'ui/src/context/TabContext'; import { usePromoContext } from '../context/PromoContext'; // Import the usePromoContext hook import { isLinkActive } from './sharedFunctions'; const PluginNav: React.FC = () => { const location = useLocation(); const tabsContext = useContext(TabContext); const { showPromo } = usePromoContext(); // Replace the showPromo prop with the usePromoContext hook if (!tabsContext) { throw new Error('ChildComponent must be used within a TabContextProvider'); } const { pathname } = location; const splitLocation = pathname.split('#'); return (
{/* {showPromo && !isLinkActive('#/pro') && } */}
); }; export default PluginNav;