From 577046523a2d007e8ce7eca76bda890163c591e5 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 21 Sep 2023 10:08:12 -0300 Subject: [PATCH] fix(tabsContext.tsx): change parameter type of newProject in uploadFlow function from optional boolean to required boolean to improve clarity and prevent potential bugs fix(tabsContext.tsx): change parameter type of newProject in addFlow function from optional Boolean to required Boolean to improve clarity and prevent potential bugs fix(extraSidebarComponent/index.tsx): change argument of uploadFlow function from undefined to false to fix a bug where uploadFlow was not being called correctly fix(tabs/index.ts): change parameter type of newFlow in uploadFlow function from optional boolean to required boolean to improve clarity and prevent potential bugs --- src/frontend/src/contexts/tabsContext.tsx | 4 ++-- .../pages/FlowPage/components/extraSidebarComponent/index.tsx | 2 +- src/frontend/src/types/tabs/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 196a24707..3c24fda15 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -316,7 +316,7 @@ export function TabsProvider({ children }: { children: ReactNode }) { * The resulting JSON object is passed to the addFlow function. */ async function uploadFlow( - newProject?: boolean, + newProject: boolean, file?: File ): Promise { let id; @@ -486,7 +486,7 @@ export function TabsProvider({ children }: { children: ReactNode }) { } const addFlow = async ( - newProject?: Boolean, + newProject: Boolean, flow?: FlowType ): Promise => { if (newProject) { diff --git a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx index 8ea74390a..fed9726ea 100644 --- a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx @@ -77,7 +77,7 @@ export default function ExtraSidebar(): JSX.Element {