From f289283b0c48620d809e655c012075866d412e50 Mon Sep 17 00:00:00 2001 From: Katrina Connors Date: Tue, 19 Nov 2024 12:54:54 -0800 Subject: [PATCH] comments for later troubleshooting --- src/pages/benchmarks/[benchmark_id]/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/benchmarks/[benchmark_id]/index.tsx b/src/pages/benchmarks/[benchmark_id]/index.tsx index e3706ca6..90cab42f 100644 --- a/src/pages/benchmarks/[benchmark_id]/index.tsx +++ b/src/pages/benchmarks/[benchmark_id]/index.tsx @@ -115,6 +115,8 @@ const BenchmarkPage = () => { (task.trials.length === 0 || task.trials[task.trials.length - 1]?.submitted === true) ) { + // FIXME: This mutation runs twice if the page is loaded from the link in the instructions page + // It only runs once if the page is loaded at this URL from scratch addTrialMutation.mutate({ task_id: task.task_id, success: 0, @@ -273,8 +275,8 @@ const BenchmarkPage = () => { {hasInputChanged || updateTrialMutation.isLoading ? "Saving..." : updateTrialMutation.isError - ? "uh oh" - : "Saved to Cloud"} + ? "uh oh" + : "Saved to Cloud"}