diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx
index 749ca348c..fc04b98fa 100644
--- a/src/frontend/src/contexts/tabsContext.tsx
+++ b/src/frontend/src/contexts/tabsContext.tsx
@@ -423,8 +423,8 @@ export function TabsProvider({ children }: { children: ReactNode }) {
saveFlowToDatabase(newFlow)
.then((id) => {
- // Increment the ID counter.
- setId(id);
+ // Change the id to the new id.
+ newFlow.id = id.id;
})
.then(() => {
// Add the new flow to the list of flows.
diff --git a/src/frontend/src/pages/MainPage/index.tsx b/src/frontend/src/pages/MainPage/index.tsx
index d6c10e291..4abafdfbd 100644
--- a/src/frontend/src/pages/MainPage/index.tsx
+++ b/src/frontend/src/pages/MainPage/index.tsx
@@ -8,7 +8,7 @@ import ExtraSidebar from "../../components/ExtraSidebarComponent";
import { ReactFlowProvider } from "reactflow";
import FlowPage from "../FlowPage";
import { useContext, useEffect, useState } from "react";
-import { SunIcon, MoonIcon, BellIcon, GithubIcon, Download, Upload } from "lucide-react";
+import { SunIcon, MoonIcon, BellIcon, GithubIcon, Download, Upload, Plus } from "lucide-react";
import { TabsContext } from "../../contexts/tabsContext";
import AlertDropdown from "../../alerts/alertDropDown";
import { alertContext } from "../../contexts/alertContext";
@@ -29,6 +29,7 @@ export default function HomePage() {
setTabId,
downloadFlows,
uploadFlows,
+ addFlow,
} = useContext(TabsContext);
useEffect(() => {
setTabId("");
@@ -52,11 +53,16 @@ export default function HomePage() {