File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/components/TableOfContents Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { usePathname } from "next/navigation"
1
2
import { useTranslation } from "next-i18next"
2
3
import { FaGithub } from "react-icons/fa"
3
4
import {
@@ -36,6 +37,7 @@ const TableOfContents = ({
36
37
isMobile = false ,
37
38
...rest
38
39
} : TableOfContentsProps ) => {
40
+ const pathname = usePathname ( )
39
41
const { t } = useTranslation ( "common" )
40
42
// TODO: Replace with direct token implementation after UI migration is completed
41
43
const lgBp = useToken ( "breakpoints" , "lg" )
@@ -85,6 +87,11 @@ const TableOfContents = ({
85
87
leftIcon = { < Icon as = { FaGithub } /> }
86
88
href = { editPath }
87
89
variant = "outline"
90
+ customEventOptions = { {
91
+ eventCategory : "edit_page" ,
92
+ eventAction : "gh_edit_click" ,
93
+ eventName : `${ pathname } ` ,
94
+ } }
88
95
>
89
96
{ t ( "edit-page" ) }
90
97
</ ButtonLink >
You can’t perform that action at this time.
0 commit comments