diff --git a/src/ui/components/data-inspector/DataInspector.js b/src/ui/components/data-inspector/DataInspector.js index 886a7d577..d6b88be9f 100644 --- a/src/ui/components/data-inspector/DataInspector.js +++ b/src/ui/components/data-inspector/DataInspector.js @@ -12,7 +12,7 @@ import Tooltip from '../Tooltip.js'; import styled from '../../styled/index.js'; import DataPreview from './DataPreview.js'; import createPaste from '../../../fb-stubs/createPaste.tsx'; -import {reportInteraction} from '../../../utils/InteractionTracker.js'; +import {reportInteraction} from '../../../utils/InteractionTracker.tsx'; import {getSortedKeys} from './utils.js'; import {colors} from '../colors.js'; import {clipboard} from 'electron'; diff --git a/src/ui/components/elements-inspector/elements.js b/src/ui/components/elements-inspector/elements.js index bf55449a7..77e62fc33 100644 --- a/src/ui/components/elements-inspector/elements.js +++ b/src/ui/components/elements-inspector/elements.js @@ -10,7 +10,7 @@ import type { Element, ElementSearchResultSet, } from './ElementsInspector.js'; -import {reportInteraction} from '../../../utils/InteractionTracker'; +import {reportInteraction} from '../../../utils/InteractionTracker.tsx'; import ContextMenu from '../ContextMenu.js'; import {PureComponent, type Element as ReactElement} from 'react'; import FlexRow from '../FlexRow.js'; diff --git a/src/utils/InteractionTracker.js b/src/utils/InteractionTracker.tsx similarity index 83% rename from src/utils/InteractionTracker.js rename to src/utils/InteractionTracker.tsx index f30a7981b..e7bd7cd8e 100644 --- a/src/utils/InteractionTracker.js +++ b/src/utils/InteractionTracker.tsx @@ -5,7 +5,7 @@ * @format */ -import {getInstance as getLogger} from '../fb-stubs/Logger.tsx'; +import {getInstance as getLogger} from '../fb-stubs/Logger'; export function reportInteraction( componentType: string, @@ -20,14 +20,13 @@ class InteractionTracker { type: string; id: string; - interaction: (name: string, data: any) => void; constructor(componentType: string, componentIdentifier: string) { this.type = componentType; this.id = componentIdentifier; } - interaction = (name: string, data: any) => { + interaction = (name: string, data: any): void => { getLogger().track('usage', 'interaction', { interaction: InteractionTracker.numberOfInteractions++, type: this.type,