add matomo to handlers

pull/4976/head
Joseph Izang 5 months ago
parent c462f92994
commit fd998a1204
  1. 3
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx

@ -115,6 +115,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
if (treeRef.current) {
const deleteKeyPressHandler = async (eve: KeyboardEvent) => {
if (eve.key === 'Delete' ) {
(window as any)._paq.push(['trackEvent', 'fileExplorer', 'deleteKey'])
setState((prevState) => {
return { ...prevState, deleteKey: true }
})
@ -123,6 +124,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
}
if (eve.metaKey) {
if (eve.key === 'Backspace') {
(window as any)._paq.push(['trackEvent', 'fileExplorer', 'osxDeleteKey'])
setState((prevState) => {
return { ...prevState, deleteKey: true }
})
@ -168,6 +170,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
if (treeRef.current) {
const F2KeyPressHandler = async (eve: KeyboardEvent) => {
if (eve.key === 'F2' ) {
(window as any)._paq.push(['trackEvent', 'fileExplorer', 'f2ToRename'])
await performRename()
setState((prevState) => {
return { ...prevState, F2Key: true }

Loading…
Cancel
Save