From d25fd7321ff31943b77fd80959d018e6864f29e4 Mon Sep 17 00:00:00 2001 From: Jojo Ortiz Date: Sat, 10 Aug 2024 16:40:44 -0700 Subject: [PATCH 1/2] fix setIsloading for runGenerate --- app/pages/sustainabilityreports/page.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/pages/sustainabilityreports/page.tsx b/app/pages/sustainabilityreports/page.tsx index 0559b97..87b4980 100644 --- a/app/pages/sustainabilityreports/page.tsx +++ b/app/pages/sustainabilityreports/page.tsx @@ -63,7 +63,6 @@ function Page() { } catch (error) { console.error('Error regenerating report:', error); } finally { - setIsLoading(false); updateStatus(reportId, GenerationStatus.GENERATED); } }; @@ -74,10 +73,6 @@ function Page() { setIsLoading(false); }; - // const runGenerate = async (reportIndex: number) => { - // console.log('Generating new report:', reportIndex); - // }; - const handleGenerateNewAll = async () => { setIsLoading(true); try { From bd1a6a075ab9788770f393255c6954c6d5bb3a0e Mon Sep 17 00:00:00 2001 From: Jojo Ortiz Date: Sat, 10 Aug 2024 16:42:54 -0700 Subject: [PATCH 2/2] move report buttons to end --- app/pages/sustainabilityreports/page.tsx | 52 ++++++++++++------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/app/pages/sustainabilityreports/page.tsx b/app/pages/sustainabilityreports/page.tsx index 87b4980..46b8957 100644 --- a/app/pages/sustainabilityreports/page.tsx +++ b/app/pages/sustainabilityreports/page.tsx @@ -213,31 +213,33 @@ function Page() { ))} {attributes.length > 0 && reports.length > 0 && ( -
- - +
+
+ + +
)}