import cx from 'classnames' import { useMainContext } from 'components/context/MainContext' import { SidebarProduct } from 'src/landings/components/SidebarProduct' import { SidebarHomepage } from 'src/landings/components/SidebarHomepage' import { AllProductsLink } from './AllProductsLink' import { ApiVersionPicker } from 'src/rest/components/ApiVersionPicker' import { Link } from 'components/Link' type Props = { variant?: 'full' | 'overlay' } export const SidebarNav = ({ variant = 'full' }: Props) => { const { currentProduct } = useMainContext() const isRestPage = currentProduct && currentProduct.id === 'rest' // we need to roughly account for the site header height plus the height of // the side nav header (which is taller when we show the API version picker) // so we don't cut off the bottom of the sidebar const sidebarPaddingBottom = isRestPage ? '250px' : '185px' return (
{variant === 'full' && currentProduct && (
{currentProduct && (
{currentProduct.name}
)} {variant === 'full' && isRestPage && }
)}
) }