From 8b5cdc8aab949f5fc1b1f5b1b80097f12e89d1f8 Mon Sep 17 00:00:00 2001 From: graham Date: Tue, 7 May 2024 10:30:21 -0400 Subject: [PATCH] Reskinning stuck to bug reporting (#1649) * Reskinning stuck to bug reporting * rename stuck to bug report * Do away w/ stuckcategory * revert * Switch to bug category * typo * ... * add debug logging on failure to update airtable * Update navbar-editor.tsx forcing recompile --- src/components/navbar-editor.tsx | 18 +++++++++++------- .../api/{stuck-request.ts => bug-report.ts} | 14 +++++++++----- 2 files changed, 20 insertions(+), 12 deletions(-) rename src/pages/api/{stuck-request.ts => bug-report.ts} (73%) diff --git a/src/components/navbar-editor.tsx b/src/components/navbar-editor.tsx index 5820699f15..a9430fbbd5 100644 --- a/src/components/navbar-editor.tsx +++ b/src/components/navbar-editor.tsx @@ -54,8 +54,7 @@ interface EditorNavbarProps { persistenceState: Signal } -type StuckCategory = "Logic Error" | "Syntax Error" | "Other"; - +type StuckCategory = "Logic Error" | "Syntax Error" | "Other" | "UI" | "Code Compilation" | "Bitmap Editor" | "Tune Editor" | "Help/Tutorial Window" | "AI Chat" | "Website"; type StuckData = { category: StuckCategory description: string @@ -212,7 +211,7 @@ export default function EditorNavbar(props: EditorNavbarProps) {
  • @@ -298,13 +297,13 @@ export default function EditorNavbar(props: EditorNavbarProps) { }; try { - const response = await fetch("/api/stuck-request", { + const response = await fetch("/api/bug-report", { method: "POST", body: JSON.stringify(payload) }) // Let the user know we'll get back to them after we've receive their complaint if (response.ok) { - alert("We received your request and will get back to you via email.") + alert("We received your bug report! Thanks!") } else alert("We couldn't send your request. Please make sure you're connected and try again.") } catch (err) { @@ -317,9 +316,14 @@ export default function EditorNavbar(props: EditorNavbarProps) {