1
0
mirror of synced 2026-01-06 06:02:35 -05:00

Merge pull request #33384 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-06-06 11:58:55 -07:00
committed by GitHub
2 changed files with 4 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ Private vulnerability reporting makes it easy for security researchers to report
For security researchers, the benefits of using private vulnerability reporting are:
- Less frustration, and less time spent trying to figure out how to contact the maintainer.
- A smoother process for disclosing and discussing vulnerability details.
- The opportunity to discuss vulnerability details privately with repository maintainer.
- The opportunity to discuss vulnerability details privately with the repository maintainer.
{% data reusables.security-advisory.private-vulnerability-reporting-disabled %}

View File

@@ -1,3 +1,4 @@
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { NavList } from '@primer/react'
@@ -75,7 +76,7 @@ export const SidebarProduct = () => {
}
function NavListItem({ childPage }: { childPage: ProductTreeNode }) {
const { push, asPath, locale } = useRouter()
const { asPath, locale } = useRouter()
const routePath = `/${locale}${asPath.split('?')[0].split('#')[0]}`
const isActive = routePath === childPage.href
@@ -83,12 +84,8 @@ function NavListItem({ childPage }: { childPage: ProductTreeNode }) {
<NavList.Item
defaultOpen={childPage.childPages.length > 0 && routePath.includes(childPage.href)}
href={childPage.href}
as={Link}
aria-current={isActive ? 'page' : false}
onClick={(event) => {
// XXX TODO: If the `childPage.href` is an external link, don't try to do anything fancy here.
event.preventDefault()
push(childPage.href)
}}
>
{childPage.title}
{childPage.childPages.length > 0 && (