1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Files
docs/components/sidebar/SidebarNav.tsx
Grace Park ef2efb0636 Feature Branch: Global Nav Phase 1 (#33465)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
Co-authored-by: Joe Oak <41307427+joeoak@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-01-31 17:49:50 +00:00

24 lines
680 B
TypeScript

import { useMainContext } from 'components/context/MainContext'
import { SidebarProduct } from './SidebarProduct'
import { SidebarHomepage } from './SidebarHomepage'
export const SidebarNav = () => {
const { error, currentProduct } = useMainContext()
return (
<div
className="d-none d-lg-block bg-primary position-sticky overflow-y-auto flex-shrink-0 pb-11 border-right"
style={{ width: 326, height: '100vh', top: '67px' }}
role="banner"
>
<nav>
{error === '404' || !currentProduct || currentProduct.id === 'search' ? (
<SidebarHomepage />
) : (
<SidebarProduct />
)}
</nav>
</div>
)
}