import cx from 'classnames' import { useRouter } from 'next/router' import { useMainContext } from '@/frame/components/context/MainContext' import { SidebarProduct } from '@/landings/components/SidebarProduct' import { SidebarSearchAggregates } from '@/search/components/results/SidebarSearchAggregates' import { AllProductsLink } from './AllProductsLink' import { ApiVersionPicker } from '@/rest/components/ApiVersionPicker' import { Link } from '@/frame/components/Link' import styles from './SidebarNav.module.scss' type Props = { variant?: 'full' | 'overlay' } export const SidebarNav = ({ variant = 'full' }: Props) => { const { currentProduct, currentProductName } = useMainContext() const router = useRouter() const isRestPage = currentProduct && currentProduct.id === 'rest' const showCurrentProductLink = currentProduct && // Early access does not have a "home page" unless it's local dev (process.env.NODE_ENV === 'development' || currentProduct.id !== 'early-access') const isSearch = currentProduct?.id === 'search' return (
) }