Skip to content

Commit f6e00f9

Browse files
graceparkpeterbe
andauthored
TreeView -> NavList (#41359)
Co-authored-by: Peter Bengtsson <mail@peterbe.com> Co-authored-by: Peter Bengtsson <peterbe@github.com>
1 parent b68253b commit f6e00f9

File tree

9 files changed

+172
-448
lines changed

9 files changed

+172
-448
lines changed

components/sidebar/ProductCollapsibleSection.tsx

-78
This file was deleted.

components/sidebar/SidebarNav.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import cx from 'classnames'
2+
import { useRouter } from 'next/router'
23

34
import { useMainContext } from 'components/context/MainContext'
45
import { SidebarProduct } from 'src/landings/components/SidebarProduct'
@@ -12,6 +13,7 @@ type Props = {
1213

1314
export const SidebarNav = ({ variant = 'full' }: Props) => {
1415
const { currentProduct } = useMainContext()
16+
const router = useRouter()
1517
const isRestPage = currentProduct && currentProduct.id === 'rest'
1618
// we need to roughly account for the site header height plus the height of
1719
// the side nav header (which is taller when we show the API version picker)
@@ -51,7 +53,7 @@ export const SidebarNav = ({ variant = 'full' }: Props) => {
5153
)}
5254
style={{ width: 326, height: 'calc(100vh - 175px)', paddingBottom: sidebarPaddingBottom }}
5355
>
54-
<SidebarProduct />
56+
<SidebarProduct key={router.asPath} />
5557
</div>
5658
</nav>
5759
</div>

package-lock.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@primer/css": "^21.0.7",
6363
"@primer/octicons": "^19.5.0",
6464
"@primer/octicons-react": "^19.5.0",
65-
"@primer/react": "35.28.0",
65+
"@primer/react": "35.29.0",
6666
"accept-language-parser": "^1.5.0",
6767
"ajv": "^8.11.0",
6868
"ajv-errors": "^3.0.0",

0 commit comments

Comments
 (0)