1
1
mirror of https://github.com/StanGirard/quivr.git synced 2024-12-19 17:01:41 +03:00
quivr/frontend/lib/context/BrainProvider/brain-provider.tsx

25 lines
519 B
TypeScript
Raw Normal View History

"use client";
import { createContext } from "react";
import { useBrainProvider } from "./hooks/useBrainProvider";
import { BrainContextType } from "./types";
export const BrainContext = createContext<BrainContextType | undefined>(
undefined
);
export const BrainProvider = ({
children,
}: {
children: React.ReactNode;
}): JSX.Element => {
const brainProviderUtils = useBrainProvider();
return (
<BrainContext.Provider value={brainProviderUtils}>
{children}
</BrainContext.Provider>
);
};