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