diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 79b39ad60..cba2376b5 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -260,9 +260,6 @@ export function TabsProvider({ children }: { children: ReactNode }) { // simulate a click on the link element to trigger the download link.click(); - setNoticeData({ - title: "Warning: Critical data, JSON file may include API keys.", - }); } function downloadFlows() { @@ -300,7 +297,7 @@ export function TabsProvider({ children }: { children: ReactNode }) { let fileData = JSON.parse(text); if (fileData.flows) { fileData.flows.forEach((flow: FlowType) => { - id = addFlow(flow, newProject); + id = addFlow(newProject, flow); }); } // parse the text into a JSON object diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx index 01b655b39..89bc292c9 100644 --- a/src/frontend/src/modals/exportModal/index.tsx +++ b/src/frontend/src/modals/exportModal/index.tsx @@ -4,6 +4,7 @@ import IconComponent from "../../components/genericIconComponent"; import { Button } from "../../components/ui/button"; import { Checkbox } from "../../components/ui/checkbox"; import { EXPORT_DIALOG_SUBTITLE } from "../../constants/constants"; +import { alertContext } from "../../contexts/alertContext"; import { TabsContext } from "../../contexts/tabsContext"; import { removeApiKeys } from "../../utils/reactflowUtils"; import BaseModal from "../baseModal"; @@ -11,7 +12,8 @@ import BaseModal from "../baseModal"; const ExportModal = forwardRef( (props: { children: ReactNode }, ref): JSX.Element => { const { flows, tabId, downloadFlow } = useContext(TabsContext); - const [checked, setChecked] = useState(false); + const { setNoticeData } = useContext(alertContext); + const [checked, setChecked] = useState(true); const flow = flows.find((f) => f.id === tabId); useEffect(() => { setName(flow!.name); @@ -44,6 +46,7 @@ const ExportModal = forwardRef(