docs: improved analytics and tracking (#13671)
* docs: improved analytics and tracking * remove detailed feedback component * remove ignore build script for api reference * improvements * fix pathname
This commit is contained in:
23
www/apps/api-reference/components/Feedback/index.tsx
Normal file
23
www/apps/api-reference/components/Feedback/index.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
"use client"
|
||||
|
||||
import { Feedback as UiFeedback, FeedbackProps } from "docs-ui"
|
||||
import { usePathname } from "next/navigation"
|
||||
import { useArea } from "../../providers/area"
|
||||
|
||||
export const Feedback = (props: Partial<FeedbackProps>) => {
|
||||
const pathname = usePathname()
|
||||
const { area } = useArea()
|
||||
|
||||
return (
|
||||
<UiFeedback
|
||||
vertical={true}
|
||||
{...props}
|
||||
event="survey_api-ref"
|
||||
extraData={{
|
||||
area,
|
||||
...props.extraData,
|
||||
}}
|
||||
pathName={`/api/${pathname}`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user