From 78a56faa550faba0f5cc4d0c056bc48e7831fdaf Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Tue, 18 Feb 2025 15:16:33 -0800 Subject: [PATCH] Followup fixes --- app/components/header/Feedback.tsx | 6 ++++-- app/lib/replay/Problems.ts | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/components/header/Feedback.tsx b/app/components/header/Feedback.tsx index 34dee664..34ca3d1b 100644 --- a/app/components/header/Feedback.tsx +++ b/app/components/header/Feedback.tsx @@ -55,8 +55,10 @@ export function Feedback() { feedbackData.chatMessages = getLastChatMessages(); } - await submitFeedback(feedbackData); - setSubmitted(true); + const success = await submitFeedback(feedbackData); + if (success) { + setSubmitted(true); + } } return ( diff --git a/app/lib/replay/Problems.ts b/app/lib/replay/Problems.ts index f044238d..25c9d331 100644 --- a/app/lib/replay/Problems.ts +++ b/app/lib/replay/Problems.ts @@ -177,10 +177,10 @@ export async function submitFeedback(feedback: any) { }, }); console.log("SubmitFeedbackRval", rv); - return (rv as any).rval.problemId; + return true; } catch (error) { console.error("Error submitting feedback", error); toast.error("Failed to submit feedback"); - return null; + return false; } }