11import styled , { css } from 'styled-components'
2- // import { useAppSelector } from 'hooks/useRedux'
3- // import { selectHierarchalRoutes } from 'components/Routes/routesReducer'
42import { ThemeToggle } from '@/components/Theme/ThemeToggle'
53import { LinkNavigation } from '@/components/Link/LinkNavigation'
64import { VersionBadge } from '@/components/VersionBadge/VersionBadge'
@@ -10,6 +8,7 @@ import { SPACINGS } from '@/utils/spacings'
108import { FONT_SIZES } from '@/utils/font-sizes'
119import { Search } from '@/components/Search/Search'
1210import { createGapStyles } from '@/utils/create-gap-styles'
11+ import { useSiteNavigationContext } from '../SiteNavigation/SiteNavigationContext'
1312
1413const ITEM_SPACING_DESKTOP = SPACINGS . CUSTOM ( ( ) => 2.8 )
1514
@@ -45,19 +44,18 @@ const Link = styled(LinkNavigation)`
4544`
4645
4746export function HeaderActions ( ) {
48- // TODO: Replace with header routes, not docs routes
49- // const hierarchicalRoutes = useAppSelector(selectHierarchalRoutes)
47+ const { flatRoutes } = useSiteNavigationContext ( )
5048
5149 return (
5250 < HeaderActionsWrapper >
5351 < Item $hiddenAtCompact >
5452 < nav aria-label = "Quick Navigation Menu" >
5553 < HeaderActionsWrapper >
56- { /* {hierarchicalRoutes .map((route) => (
57- <Item key={route.id }>
54+ { flatRoutes . map ( ( route ) => (
55+ < Item key = { route . slug } >
5856 < Link slug = { route . slug } > { route . title } </ Link >
5957 </ Item >
60- ))} */ }
58+ ) ) }
6159 </ HeaderActionsWrapper >
6260 </ nav >
6361 </ Item >
0 commit comments