From 0fe46a39093eb5db1b4957190aeae071fe3ad557 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 4 Sep 2023 18:48:50 -0300 Subject: [PATCH 1/4] revert to default animation of radixUI --- src/frontend/src/components/ui/dialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/ui/dialog.tsx b/src/frontend/src/components/ui/dialog.tsx index 57dda0fef..ee673bf2b 100644 --- a/src/frontend/src/components/ui/dialog.tsx +++ b/src/frontend/src/components/ui/dialog.tsx @@ -27,7 +27,7 @@ const DialogOverlay = React.forwardRef< Date: Mon, 4 Sep 2023 19:29:20 -0300 Subject: [PATCH 2/4] fix animation --- src/frontend/src/components/ui/dialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/ui/dialog.tsx b/src/frontend/src/components/ui/dialog.tsx index ee673bf2b..93680ce7e 100644 --- a/src/frontend/src/components/ui/dialog.tsx +++ b/src/frontend/src/components/ui/dialog.tsx @@ -27,7 +27,7 @@ const DialogOverlay = React.forwardRef< Date: Mon, 4 Sep 2023 19:33:21 -0300 Subject: [PATCH 3/4] refactor(codeTabsComponent): wrap code tabs in a div with flex column layout for better styling and readability --- src/frontend/src/components/codeTabsComponent/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index d807326f0..9868b709a 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -180,7 +180,7 @@ export default function CodeTabsComponent({ key={idx} // Remember to add a unique key prop > {idx < 4 ? ( - <> +
{tab.description && (
{tab.code} - +
) : idx === 4 ? ( <>
From e50b59368101a0af72ed431017ea94944133892d Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Mon, 4 Sep 2023 20:18:10 -0300 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=90=9B=20fix(API/index.ts):=20handle?= =?UTF-8?q?=20potential=20undefined=20response=20object=20properties=20to?= =?UTF-8?q?=20prevent=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/controllers/API/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index d9ea890c8..bdf7e5221 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -164,7 +164,7 @@ export async function readFlowsFromDatabase() { try { const response = await api.get(`${BASE_URL_API}flows/`); if (response?.status !== 200) { - throw new Error(`HTTP error! status: ${response.status}`); + throw new Error(`HTTP error! status: ${response?.status}`); } return response.data; } catch (error) { @@ -177,7 +177,7 @@ export async function downloadFlowsFromDatabase() { try { const response = await api.get(`${BASE_URL_API}flows/download/`); if (response?.status !== 200) { - throw new Error(`HTTP error! status: ${response.status}`); + throw new Error(`HTTP error! status: ${response?.status}`); } return response.data; } catch (error) { @@ -190,8 +190,8 @@ export async function uploadFlowsToDatabase(flows: FormData) { try { const response = await api.post(`${BASE_URL_API}flows/upload/`, flows); - if (response.status !== 201) { - throw new Error(`HTTP error! status: ${response.status}`); + if (response?.status !== 201) { + throw new Error(`HTTP error! status: ${response?.status}`); } return response.data; } catch (error) {