mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 19:49:16 +00:00
15 lines
381 B
JavaScript
15 lines
381 B
JavaScript
|
import { createContext } from 'react';
|
||
|
import { useAccountContext } from './useAccountContext.hook';
|
||
|
|
||
|
export const AccountContext = createContext({});
|
||
|
|
||
|
export function AccountContextProvider({ children }) {
|
||
|
const { state, actions } = useAccountContext();
|
||
|
return (
|
||
|
<AccountContext.Provider value={{ state, actions }}>
|
||
|
{children}
|
||
|
</AccountContext.Provider>
|
||
|
);
|
||
|
}
|
||
|
|