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; } }