From 768a7cd754485e93be81fc4954244a2b2081319a Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 24 Oct 2023 20:10:29 -0300 Subject: [PATCH] feat(contexts): add StoreProvider to ContextWrapper to provide store context to components fix(storeContext.tsx): fix typo in function name, change storeProvider to StoreProvider for consistency and clarity --- src/frontend/src/contexts/index.tsx | 5 ++++- src/frontend/src/contexts/storeContext.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/contexts/index.tsx b/src/frontend/src/contexts/index.tsx index f90cb7812..d9f5ef867 100644 --- a/src/frontend/src/contexts/index.tsx +++ b/src/frontend/src/contexts/index.tsx @@ -8,6 +8,7 @@ import { AlertProvider } from "./alertContext"; import { AuthProvider } from "./authContext"; import { DarkProvider } from "./darkContext"; import { LocationProvider } from "./locationContext"; +import { StoreProvider } from "./storeContext"; import { TabsProvider } from "./tabsContext"; import { TypesProvider } from "./typesContext"; import { UndoRedoProvider } from "./undoRedoContext"; @@ -27,7 +28,9 @@ export default function ContextWrapper({ children }: { children: ReactNode }) { - {children} + + {children} + diff --git a/src/frontend/src/contexts/storeContext.tsx b/src/frontend/src/contexts/storeContext.tsx index 072e84bf1..e5f90e296 100644 --- a/src/frontend/src/contexts/storeContext.tsx +++ b/src/frontend/src/contexts/storeContext.tsx @@ -10,7 +10,7 @@ const initialValue = { export const StoreContext = createContext(initialValue); -export function storeProvider({ children }) { +export function StoreProvider({ children }) { const [savedFlows, setSavedFlows] = useState<{ [key: string]: FlowType }>({}); return (