docs: change report issue link (#10160)

This commit is contained in:
Shahed Nasser
2024-11-19 15:54:16 +02:00
committed by GitHub
parent 156494c646
commit a1738f823c
23 changed files with 40 additions and 190 deletions
@@ -9,7 +9,6 @@ export type MainNavContext = {
navItems: NavigationItem[]
activeItemIndex?: number
activeItem?: NavigationItem
reportIssueLink: string
editDate?: string
}
@@ -17,14 +16,12 @@ const MainNavContext = createContext<MainNavContext | null>(null)
export type MainNavProviderProps = {
navItems: NavigationItem[]
reportIssueLink: string
editDate?: string
children?: React.ReactNode
}
export const MainNavProvider = ({
navItems,
reportIssueLink,
children,
editDate,
}: MainNavProviderProps) => {
@@ -90,7 +87,6 @@ export const MainNavProvider = ({
value={{
navItems,
activeItemIndex,
reportIssueLink,
editDate,
activeItem,
}}
@@ -3,6 +3,7 @@
import React, { createContext, useContext, useState } from "react"
import { DocsConfig } from "types"
import { globalConfig } from "../../global-config"
import { GITHUB_ISSUES_LINK } from "../.."
export type SiteConfigContextType = {
config: DocsConfig
@@ -21,21 +22,25 @@ export const SiteConfigProvider = ({
children,
}: SiteConfigProviderProps) => {
const [config, setConfig] = useState<DocsConfig>(
initConfig || {
baseUrl: "",
sidebar: {
default: [],
mobile: [],
Object.assign(
{
baseUrl: "",
sidebar: {
default: [],
mobile: [],
},
project: {
title: "",
key: "",
},
breadcrumbOptions: {
showCategories: true,
},
reportIssueLink: GITHUB_ISSUES_LINK,
},
project: {
title: "",
key: "",
},
breadcrumbOptions: {
showCategories: true,
},
...globalConfig,
}
globalConfig,
initConfig || {}
)
)
return (