mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 11:39:17 +00:00
15 lines
416 B
JavaScript
15 lines
416 B
JavaScript
|
import { createContext } from 'react';
|
||
|
import { useConversationContext } from './useConversationContext.hook';
|
||
|
|
||
|
export const ConversationContext = createContext({});
|
||
|
|
||
|
export function ConversationContextProvider({ children }) {
|
||
|
const { state, actions } = useConversationContext();
|
||
|
return (
|
||
|
<ConversationContext.Provider value={{ state, actions }}>
|
||
|
{children}
|
||
|
</ConversationContext.Provider>
|
||
|
);
|
||
|
}
|
||
|
|