Skip to content

Commit

Permalink
Add feedback track
Browse files Browse the repository at this point in the history
Signed-off-by: Wei-Chun, Chang <[email protected]>
  • Loading branch information
wcchang1115 committed Dec 23, 2024
1 parent 938646d commit acf5270
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/src/components/lineage/PreviewChangeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ import { useFeedbackCollectionToast } from "@/lib/hooks/useFeedbackCollectionToa
import { VscFeedback } from "react-icons/vsc";
import { localStorageKeys } from "@/lib/api/localStorageKeys";
import { useRecceQueryContext } from "@/lib/hooks/RecceQueryContext";
import { trackPreviewChange } from "@/lib/api/track";
import {
trackPreviewChange,
trackPreviewChangeFeedback,
} from "@/lib/api/track";

interface PreviewChangeViewProps {
isOpen: boolean;
Expand Down Expand Up @@ -150,7 +153,6 @@ export function PreviewChangeView({
const queryFn = async () => {
const sqlTemplate = modifiedCode;
const runFn = submitQueryDiff;
console.log(primaryKeys);
const params: QueryParams = {
current_model: current?.name || "",
primary_keys: primaryKeys,
Expand All @@ -173,12 +175,10 @@ export function PreviewChangeView({
onFeedbackSubmit: (feedback: string) => {
switch (feedback) {
case "like":
console.log("Like");
// TODO: track feedback result
trackPreviewChangeFeedback({ feedback: "like" });
break;
case "dislike":
console.log("Dislike");
// TODO: track feedback result
trackPreviewChangeFeedback({ feedback: "dislike" });
break;
default:
console.log("Not support feedback type");
Expand Down

0 comments on commit acf5270

Please sign in to comment.