Files
medusa-store/www/apps/user-guide/components/Feedback/index.tsx
Shahed Nasser 4fe28f5a95 chore: reorganize docs apps (#7228)
* reorganize docs apps

* add README

* fix directory

* add condition for old docs
2024-05-03 17:36:38 +03:00

31 lines
665 B
TypeScript

"use client"
import {
Feedback as UiFeedback,
FeedbackProps as UiFeedbackProps,
formatReportLink,
} from "docs-ui"
import { usePathname } from "next/navigation"
import { config } from "../../config"
type FeedbackProps = Omit<UiFeedbackProps, "event" | "pathName">
const Feedback = (props: FeedbackProps) => {
const pathname = usePathname()
return (
<UiFeedback
event="survey"
pathName={pathname}
reportLink={formatReportLink(
config.titleSuffix || "",
typeof document !== "undefined" ? document.title : ""
)}
question="Was this chapter helpful?"
{...props}
/>
)
}
export default Feedback