diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 58c058866..3cbe5bbf1 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -12,9 +12,8 @@ import { NodeType } from "../../types/flow"; export default function Chat({ flow }: ChatType) { const [open, setOpen] = useState(false); - const [isBuilt, setIsBuilt] = useState(false); const [canOpen, setCanOpen] = useState(false); - const { tabsState } = useContext(TabsContext); + const { tabsState, isBuilt, setIsBuilt } = useContext(TabsContext); useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index d12fa18ba..9ae22de4d 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -40,6 +40,8 @@ const TabsContextInitialValue: TabsContextType = { downloadFlows: () => {}, uploadFlows: () => {}, uploadFlow: () => {}, + isBuilt: false, + setIsBuilt: (state: boolean) => {}, hardReset: () => {}, saveFlow: async (flow: FlowType) => {}, lastCopiedSelection: null, @@ -583,10 +585,14 @@ export function TabsProvider({ children }: { children: ReactNode }) { } } + const [isBuilt, setIsBuilt] = useState(false); + return ( { @@ -278,7 +280,7 @@ const ApiModal = forwardRef( } return ( - + {children} Code diff --git a/src/frontend/src/modals/baseModal/index.tsx b/src/frontend/src/modals/baseModal/index.tsx index e679c2d89..45f9353db 100644 --- a/src/frontend/src/modals/baseModal/index.tsx +++ b/src/frontend/src/modals/baseModal/index.tsx @@ -46,11 +46,13 @@ interface BaseModalProps { ]; open?: boolean; setOpen?: (open: boolean) => void; + disable?: boolean; size?: "smaller" | "small" | "medium" | "large" | "large-h-full"; } function BaseModal({ open, setOpen, + disable = false, children, size = "large", }: BaseModalProps) { @@ -99,7 +101,10 @@ function BaseModal({ //UPDATE COLORS AND STYLE CLASSSES return ( -