diff --git a/components/Feedback.tsx b/components/Feedback.tsx index feda3b8..6475769 100644 --- a/components/Feedback.tsx +++ b/components/Feedback.tsx @@ -30,24 +30,25 @@ import { ChatBubbleIcon } from "@radix-ui/react-icons"; import { Textarea } from "./ui/textarea"; export const Feedback: FC<{ - isVisible: boolean; + isLoading: boolean; recordFeedback: (feedback: "positive" | "negative") => void; sessionId: string; -}> = ({ isVisible, recordFeedback, sessionId }) => { +}> = ({ isLoading: isLoading, recordFeedback, sessionId }) => { const [isFeedbackRecorded, setIsFeedbackRecorded] = useState(false); + const isComponentVisible = isLoading ? "hidden" : "opacity-100"; // hide the component when the answer is loading. TODO: fix scroll to bottom when it reappears. const feedbackButtonVisibility = [ - isVisible ? "opacity-100" : "hidden", isFeedbackRecorded && "hidden duration-300 ease-in", ]; return (
-
+
diff --git a/components/Session.tsx b/components/Session.tsx index 6e42776..87967e9 100644 --- a/components/Session.tsx +++ b/components/Session.tsx @@ -114,7 +114,7 @@ export const Session: FC<{ sessionData: Step[] }> = ({ @@ -201,7 +201,7 @@ const FollowupForm: FC<{ >
{suggestions?.map?.((suggestion: string) => ( { posthog.capture("followup_clicked", { sessionId,