docs: change report issue link (#10160)
This commit is contained in:
@@ -4,7 +4,7 @@ import clsx from "clsx"
|
||||
import React from "react"
|
||||
import { Link, Tooltip } from "@/components"
|
||||
import { ExclamationCircle, PlaySolid } from "@medusajs/icons"
|
||||
import { GITHUB_ISSUES_PREFIX } from "@/constants"
|
||||
import { GITHUB_ISSUES_LINK } from "@/constants"
|
||||
import { CodeBlockCopyAction } from "./Copy"
|
||||
|
||||
export type CodeBlockActionsProps = {
|
||||
@@ -109,9 +109,7 @@ export const CodeBlockActions = ({
|
||||
)}
|
||||
>
|
||||
<Link
|
||||
href={`${GITHUB_ISSUES_PREFIX}&title=${encodeURIComponent(
|
||||
`Docs(Code Issue): `
|
||||
)}`}
|
||||
href={GITHUB_ISSUES_LINK}
|
||||
target="_blank"
|
||||
className={clsx(
|
||||
"bg-transparent border-none cursor-pointer rounded",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import React, { useRef, useState } from "react"
|
||||
import React, { useMemo, useRef, useState } from "react"
|
||||
// @ts-expect-error can't install the types package because it doesn't support React v19
|
||||
import { CSSTransition, SwitchTransition } from "react-transition-group"
|
||||
import { Solutions } from "./Solutions"
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
} from "@/components"
|
||||
import { ChatBubbleLeftRight, ThumbDown, ThumbUp } from "@medusajs/icons"
|
||||
import Link from "next/link"
|
||||
import { useSiteConfig } from "../../providers"
|
||||
|
||||
export type FeedbackProps = {
|
||||
event: string
|
||||
@@ -39,7 +40,7 @@ export type FeedbackProps = {
|
||||
export const Feedback = ({
|
||||
event,
|
||||
pathName,
|
||||
reportLink,
|
||||
reportLink: initReportLink,
|
||||
question = "Was this page helpful?",
|
||||
positiveBtn = "It was helpful",
|
||||
negativeBtn = "It wasn't helpful",
|
||||
@@ -54,6 +55,12 @@ export const Feedback = ({
|
||||
showLongForm = false,
|
||||
showDottedSeparator = true,
|
||||
}: FeedbackProps) => {
|
||||
const {
|
||||
config: { reportIssueLink },
|
||||
} = useSiteConfig()
|
||||
const reportLink = useMemo(() => {
|
||||
return initReportLink || reportIssueLink
|
||||
}, [initReportLink, reportIssueLink])
|
||||
const [showForm, setShowForm] = useState(false)
|
||||
const [submittedFeedback, setSubmittedFeedback] = useState(false)
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
@@ -26,7 +26,7 @@ type MainNavProps = {
|
||||
}
|
||||
|
||||
export const MainNav = ({ className, itemsClassName }: MainNavProps) => {
|
||||
const { reportIssueLink, editDate } = useMainNav()
|
||||
const { editDate } = useMainNav()
|
||||
const { setMobileSidebarOpen, isSidebarShown } = useSidebar()
|
||||
const { config } = useSiteConfig()
|
||||
|
||||
@@ -64,7 +64,7 @@ export const MainNav = ({ className, itemsClassName }: MainNavProps) => {
|
||||
<MainNavVersion />
|
||||
{editDate && <MainNavEditDate date={editDate} />}
|
||||
<LinkButton
|
||||
href={reportIssueLink}
|
||||
href={config.reportIssueLink || ""}
|
||||
variant="subtle"
|
||||
target="_blank"
|
||||
className="text-compact-small-plus"
|
||||
|
||||
Reference in New Issue
Block a user