Skip to content

Commit

Permalink
feat: GROW-284 - Add type for inkeep callback event
Browse files Browse the repository at this point in the history
  • Loading branch information
hba-fingerprint committed Nov 18, 2024
1 parent 2835014 commit 13f2b2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/thirdParty/Inkeep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { GetDataOptions, useVisitorData, VisitorData } from '@fingerprintjs/fing
import { FPJS_CLIENT_TIMEOUT } from '../../const';
import { useLocation } from 'react-use';
import { LocationSensorState } from 'react-use/lib/useLocation';
import type { InkeepCallbackEvent } from '@inkeep/uikit/dist/components/InkeepEventTypes';

const GET_HELP_OPTIONS_CLICKED = 'get_help_option_clicked';

Expand All @@ -37,7 +38,7 @@ export const createCustomAnalyticsCallback = (
getVisitorData: (getDataOptions?: GetDataOptions<boolean>) => Promise<VisitorData<boolean>>,
location: LocationSensorState,
) => {
return async (event) => {
return async (event: InkeepCallbackEvent) => {
if (event.eventName === GET_HELP_OPTIONS_CLICKED) {
const { visitorId } = await getVisitorData({ ignoreCache: true });

Expand Down

0 comments on commit 13f2b2d

Please sign in to comment.