Skip to content

Commit

Permalink
bugfix: fix load error
Browse files Browse the repository at this point in the history
  • Loading branch information
densumesh authored and skeptrunedev committed Feb 25, 2025
1 parent bd39cf4 commit a375fed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clients/search-component/src/utils/hooks/setClickTriggers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { startTransition } from "react";
import { ModalProps, SearchModes, useModalState } from "./modal-context";

Check failure on line 2 in clients/search-component/src/utils/hooks/setClickTriggers.ts

View workflow job for this annotation

GitHub Actions / tests

'useModalState' is defined but never used
import { TrieveSDK } from "trieve-ts-sdk";

export const setClickTriggers = (
setOpen: (open: boolean) => void,
Expand Down Expand Up @@ -27,7 +28,11 @@ export const setClickTriggers = (
}

if (element) {
const { trieveSDK } = useModalState();
const trieveSDK = new TrieveSDK({
apiKey: props.apiKey,
datasetId: props.datasetId,
});

trieveSDK.sendAnalyticsEvent({
event_name: `${props.componentName}_click`,
event_type: "click",
Expand Down

0 comments on commit a375fed

Please sign in to comment.